I built this PC with a Ryzen 5 5600X, a Gigabyte B550 Aorus Elite motherboard, 24GB of RAM, an ASUS 650W 80+ Bronze modular power supply, and a Radeon 9060 XT 16GB. It worked normally for a while, although I previously had startup problems that were fixed by replacing the CMOS battery. While gaming today, the computer suddenly powered off without warning. The room still had power, and replacing the extension cord and power cable did not help. I also tried connecting the system directly to the motherboard's power connection and to a wall outlet, but pressing the power button only makes the fans twitch for a fraction of a second before everything stops. The UPS also reported an overload when I tried using it, though the PC has not worked from a direct wall connection either. Some RGB devices, such as my headset, still light up when connected, as they always have. What should I test first, and which component is most likely to have failed?
3 Answers
The headset RGB only proves that USB standby power is reaching the motherboard; it does not show that the PSU can deliver power when the system starts. Do not repeatedly power-cycle it, and do not open the PSU. Disconnect the GPU and all nonessential devices, clear the CMOS properly, and try one RAM module at a time in the recommended slot. If it still immediately shuts off, the safest next step is a PSU tester or a known-good PSU. A sudden shutdown under gaming load makes the PSU a strong suspect, although a motherboard short or failed board can produce the same symptom.
Check every power connection carefully, especially the 24-pin motherboard cable and the 8-pin CPU cable near the processor. Also make sure no modular PSU cable from the old power supply was reused with the new one—modular cables are not universally wired the same way, and mixing them can damage components. Inspect for a loose screw or other metal object behind the motherboard that could be shorting the case. If the system still only twitches with the bare-minimum setup, test with a known-good compatible PSU before assuming the motherboard is dead.
The UPS overload may be because the power supply uses active power-factor correction, which can cause problems with some UPS units. However, since the computer also fails when connected directly to a known-good wall outlet, the UPS probably is not the main issue. A brief fan twitch usually means standby power is present, but the power supply is shutting down immediately because of a short, a failed PSU, or a motherboard fault. Disconnect the PC from power, hold the case power button for about 15 seconds, then reconnect it and test with only the motherboard, CPU, one RAM stick, and the integrated graphics if available. Remove the GPU, storage drives, USB devices, and extra fans for the first test.

I already tried a direct wall connection and got the same result, so I will focus on checking the wiring and testing the PSU outside the UPS.