Hello, i got a prebuilt PC two years ago and sometimes it randomly shuts down. When it shuts down, most of the times i just boot it up and the same thing happens. But sometimes it doesn't boot up and PSU fan starts blowing with heavy sound and i hear 4 continous beeps. But, when i open the case and i remove the RAM and install it again, it works. Could it be the PSU or is it something else.
4 beeps is generally RAM, make sure you ground yourself any any tools by touching the bare metal chassis before reseating your RAM.
sometimes these work themselves free due to heat. sometime the contacts need cleaning (a rubber eraser works - ground it first).
Also check the fans for dust bunnies and (cooler fins too) - it also may help to clean/reapply thermal paste to your cpu