Question PC restarts when entering OS

Jun 24, 2020
I recently built a PC with the specs below, and for 2 to 3 weeks, it worked properly. Then, when I ran a new program (COD Warzone) for the first time about 3 days ago, the computer restarted. The PC ended up stuck in a boot loop, showing the Automatic Repair screen after each post-repair restart. After several repetitions, I tried to wipe the hard drive and then reinstall Windows 10. But a new boot loop resulted (without the Automatic Repair screen): After installing, just before entering the operating system, the computer restarts. The computer never restarts when I enter BIOS mode, but after I leave BIOS mode and startup continues, it will soon restart, always before I am able to actually use the operating system.

I have tried various fixes. For example, I flashed the BIOS. I checked all connections in the computer. I used Ultimate Boot CD to run a diagnostic. Memtest indicated that the RAM was working with zero errors, and I used two programs to stress the CPU, which also passed with flying colors. I then removed my hard drive and SSD from the system and tried to run Linux from a 32GB USB drive. Linux began to start up and checked all files on the Linux USB, but it then restarted just as it began to load the operating system, just as similarly occurred when trying earlier to launch Windows. I have gone through many of these possibilities multiple times. Every once in a long while, trying either to install Windows, to use the Windows that was installed, or to boot Linux, the computer will get a tiny bitter farther (e.g., to the Windows startup screen or the screen with the choice between "Try Ubuntu" and "Install Ubuntu") and then it restarts, a couple seconds later than usual.

Does anybody know what could be causing the issue and/or how to fix it?

PC Specs:
CPU: AMD Ryzen 7 3700x
Motherboard: MSI B450 Tomahawk Max
GPU: Nvidia GeForce 2070 Super
RAM: 16Gb DDR4 3600 MHz (2x8)
Power Supply: Corsair CX-M Series 650W