Question PC shuts down randomly then struggles to boot ?

Mar 25, 2022

I built this rig in 2019, I had no problems with it until 4-5 months ago.

CPU: AMD Ryzen 5 2600x
Mobo: ASUS prime B450 plus
RAM: G.Skill Aegis 2x8GB ddr4 3000
Storage: WD Blue 1TB HDD + Samsung 860 EVO 500GB (OS is on this one) + Kingston A2000 1TB
GPU: ASUS GTX 1070 dual 8GB
PSU: Cooler Master MWE Gold 550 (fully modular)
OS: win 10 64 bit

The issue is that my pc turns off randomly. While gaming, while browsing, while watching videos. Sometimes there is no problem for 2 hours straight, on other occasions I can't even log into windows becasue it just shuts down. When I try to restart it, usually I hear the fans turn on, there is no "beep" and the pc is off again. After a while I try to start the pc again, the fans turn on, there is a short beep and the pc boots. There is no overheating, and I've already cleaned the pc.

I believe either the motherboard or the psu is at fault, but I am not sure which one.