50°C is not a temperature that should lock up your system, or do you mean on the outside of the casing? Otherwise that is a fairly normal operating temperature for a CPU, especially for a notebook that is even quite good. If it goes beyond 80°C it might be concerning, but I had a notebook CPU that regularly reached 95°C while still being stable.
Difficult to say, but I would very much believe this to be a software issue. Your main memory is quite low but that should also not lock your system, just slow it down.
I think 20.04 is the current long term support version from Ubuntu. Are you sure it completely locks up? If you hit CTRL+ALT+F1 - F4 it doesn't bring you to the system console? Otherwise a software component might be crashing.
A reinstall might work, could perhaps be a driver issue that causes the freeze. Difficult to analyze.