Question PC keeps rebooting when loading into Windows

Mar 2, 2020
2
0
10
Specs:
I9-9900k
MSI z390-A Pro Gaming
Nvidia GeForce gtx 1070
2x8gb Lpx Vengeance 3000mhz
2 tb Samsung 860 QVO SSD
Corsair CX 750M
Corsair H100i Pro Cooler

PCkeeps restarting when booting into Windows. Old pc was possibly stuck by lightning. Everything is new except for the cpu cooler and gpu. Tried re-installing windows with a cd and flash drive. Tried updated bios and it didn’t reboot during that process. Can’t get past windows setup without the computer turning itself off and back on. Don’t know what the problem could possibly be.