PC restarting out of nowhere

I’ve had a gaming PC for a while now. I’ve always taken very good care of it. I’m constantly changing the thermal paste, cleaning the dust once a month, anyway… it’s spotless. What’s happening is that now it has started restarting out of nowhere. With no heavy processes running. I leave it on all day, then I go check it, and out of nowhere it has already restarted. I was advised to clean the RAM sticks with an eraser. I’ve done that and they don’t even look dirty.

What else could I test in this case?

Yikes, I think it could be a whole bunch of things.
I had a PC that did that and it was the power supply. Test it, you never know…