Question Restarting problem


Mar 31, 2018
Hello everyone!
Desperation has brought me here as I am looking for a solution to my PC restarting randomly, usually when I play games but also when I'm afk.
I built a PC on June 2nd and I have never felt that unlucky before. I have only had problems ever since, so I am here to ask for help.
First of all, the specs:
CPU Ryzen 7 3800X
Mobo MSI MPG X570 Gaming Edge Wifi (Latest stable BIOS version)
GPU RTX 2070 Super
RAM 2x 8GB Crucial Ballistix 3600MHz (Both with and without XMP)
SSD Sabrent Rocket NVMe 512GB
Cooler Arctic Freezer II 360
Case Phanteks Eclipse P400A
OS Windows 10 Pro
Other stuff plugged in: Plantronics Gamecom 780/788, Logitech G910, Logitech G403, Logitech C920, a couple of monitors that shouldn't really matter.
The only product that wasn't brand new was the PSU and that's because I got it from a friend who had no issues at all but wanted to upgrade to a Platinum one. I have replaced the SSD, the Cooler and the RAM for reasons unrelated to the restarts. Also I added an HDD but it's also unrelated to the problem.

To describe the issue. It's a restart that was much less frequent, but now it is even easier to happen and I feel like it is random. A black screen and then booting. It doesn't feel like the system dies completely and turns on again, but more like someone pressed the restart button and it happened immediately at a random time, it feels like the system never stops running.
-If I leave my PC on with 2 characters on auto-farm on the MMO that I play, there is a good chance that when I come back a few hours later my PC will have restarted.
-If I open DOOM Eternal, my PC will restart while playing with the fastest time being 40 seconds (!!!) into the game.
-Running a stress test doesn't make it restart, but running a stress test and a game lobby will most likely make it restart.
-Alt Tabbing in and out of game might make it restart.

The PC even restarted while playing DOOM Eternal after booting into safe mode when no random software or process was running and I even had no audio, so I have ruled out software issues, even though it hardly happened when I first formatted the PC each of the 2 times that I did. The software I have installed is also installed on my Laptop without any issues, or is trusted, so that makes me rule out software issues completely.

Hardwarewise, I suspect in this order: PSU, Motherboard, Case. It looks like a power issue so I naturally suspect the PSU to be the first one, with the motherboard being the main power receiver and then distributor. After that, the case could have a faulty reset button even though I don't believe that's it. I was in a discord call with a friend, sharing a screen with task manager and Ryzen Master running when I opened a game to make my PC restart and he managed to get a screenshot of the screen when my PC restarted and CPU's stats looked pretty normal.

First, I was experimenting with Ryzen Master settings and I saw that I couldn't make my PC restart when I turned off SMT so I was happy with it and 2 days later the restarts started again so the problem wasn't fixed after all.
Then, I replaced my PSU with a friend's to try making my PC restart with it to see if the issue was fixed and the process was:
Friend's PSU: Couldn't make it restart.
My PSU: Could make it restart after trying hard.
Friend's PSU: Couldn't make it restart.
My PSU: Couldn't make it restart.
That lasted for a day but then, the restarts started again
I have tried switching to another power cord and using a different wall socket or extention.

So basically, I am trying to find a way to confirm if it's the PSU or the Motherboard because I don't want to spend money on one only to find out that the problem is still there and I replaced the wrong piece. Any recommendations ?