This is now a debated point in MAGA!
But there's a few different ways that it could all come like that, and not just Trump or his team making a huge mistake: Despite how long it has been known that solar flares and HAEMPs could damage the power grid in a way that kills 60-90% of the population before it can be fixed, I have no reason to think the USA has actually hardened its infrastructure against such risks.
After the war, the British Empire (under either the British or the Axis depending on how that fight went) may well have been turned against you directly as a way to recoup losses, and regardless of which of Axis or USSR (or the British) won, someone would have gotten the magnetron and the rockets and the nuclear explosives, and it wouldn't have been the USA.