Make sure the CPU cooling fan is running. Many times, it is because the CPU fan dead or is running below certain speed, As a preventitive mechanism, the motherboard usaully automatically shuts down the power to prevent from overheating to damage the CPU. If the fan is working, checkout the thermal paste between CPU and heatsink, or replace it with new paste for the same reason.
Otherwise, try a new poawer supply or detach components one by one to test it out as the suggestion before me. And clear CMOS also helps.
Good luck