Hi,
+1 most likely weak / failing PSU. You need to test with a known working PSU.
If you have thermal problem, you need to monitor with a program.
CPU : hwmonitor, cooltemp or realtemp. If the computer is 3 year older, I recommend reapplying thermal paste (ton of DIY on youtube)
Also remove dust from fans
GPU: download msi afterburner..
If the gpu is hitting 90 degree +, you need to clean up dust, reapply thermal paste (ton of DIY on youtube) or it might need to be replaced (might be damaged)
+1 it would help if posting full specs!