It’s sounding like your PC is having a power issue. Here are a few troubleshooting steps to attempt:
Check the Power Supply (PSU)
Make sure that the power cable plugged into the wall outlet and into the PSU is firmly in place.
Use an alternate power cable or wall outlet.
If you have a PSU switch (I/O) turn it off and on.
If possible test with another PSU.
Check for a Short Circuit
Turn off and disconnect everything.
Open your case