Question PC keeps restarting / suddenly turning off and restarts ?

Aug 15, 2021
3
0
10
Hi. Since a few days my computer keeps restarting and not sure why. It mostly happens when I turn on my PC in the morning. After a few seconds of a turn on it automatically shut down and restart. It's kept happening. Sometimes it turns off after a few minutes when the PC is on. I replaced my power supply and checked all cables, Rams etc too. Last time when this happens, I reinstall windows and it fixed. But this time it's not working. I'm not sure why that's happening and especially why it happen mostly morning. (I turn off my PC at night). Sometimes when turn on it shut down once automatically in two seconds and turning on second time. Also, I tried with my UPS and Without too. But having the same issue.

Asus Prime H310M-E r2.0 motherboard
i3 8 gen intel CPU
8gb ram (two 4gb)
550 W normal power supply
1 ssd and 1 hdd
No graphics card

Anyone can help or any idea about this ?

Thank you.