When I'm playing games, after around an hour of doing so my PC will just randomly blacks screen and then reboot. Sometimes right after it reboots and I login to my windows, it'll just reboot again, and do this a couple of times. If it does it a couple of times it'll let me know that Windows encountered a problem in booting and that I can either reboot the PC, or look at other options. I'll list my specs below because this is a brand new PC and the problem sprung up out of nowhere. So far I've checked my RAM, temps, GPU, and CPU via stress tests. I have also disabled automatic restart in Windows. None of it was cause for concern and I'm at a loss for what to do. PC was built just back in July.
CPU: Ryzen 7 5800x
GPU: Zotac 3070 ti amp holo
PSU: Corsair RM850x 80+ gold
RAM: G.skill trident z rgb, 3600 MHz CL16
Mobo: NZXT N7 B550
Cooler: NZXT Krazen z73 AIO
OS: Windows 10 Pro.
CPU: Ryzen 7 5800x
GPU: Zotac 3070 ti amp holo
PSU: Corsair RM850x 80+ gold
RAM: G.skill trident z rgb, 3600 MHz CL16
Mobo: NZXT N7 B550
Cooler: NZXT Krazen z73 AIO
OS: Windows 10 Pro.