Things though that we know about Ryzen builds.
1. BIOS SHALL be current OR the version the motherboard maker tells you to use.
2. BIOS settings SHALL be defaults or what the motherboard maker tells you to change or adjust.
3. NO OLD PSUs. Single rail and ample in size.
4. DO NOT overclock at first.
5. Because of https://www.google.com/search?q=rx+5700+xt+red+devil+reboots+site:www.reddit.com I'd review those and try another GPU. But I don't see the PSU so I can't comment further.
I started having a weird problem yesterday. My pc keeps restarting a few seconds after it passes the bios screen. I can go to the bios and everything is just fine there. I have reset the cmos on the motherboard multiple times to make sure that it wasn't a settings error. I tried looking this up but all of the solutions require going past the boot screen which is when my pc restarts itself. I downloaded a windows installer USB and even when I choose that as my boot option, it still restarts when the Windows logo shows up.
I have a rx 5700 xt red devil
Corsair h50 cooler
AMD ryzen 5 3600 cpu
16 gb 3200 mhz ram
Asus rog strix b450-f gaming motherboard