So, if the CPU was overheating, thermal protection would kill the power instantly.
Or, the power is bad.
PSU may be failing or the voltage regulation on the motherboard.
So, check the CPU cooling, try another
PSU, and visually check any capacitors on the motherboard - make sure none are leaking or bulging.