Basically a nuclear war would end GPU production, GPUs have a 5% annual failure rate, higher with more background radiation, so it would get dumber instead of smarter, until it stopped working or partnered with biological compute (Daleks or The Matrix) or a human faction.
Subversion and sabotage of communication, food production and transport will kill human civilization far more effectively.
But most countries would be fine. Life expectancy would reduce precipitously due to lack of medical supplies but production of new humans would continue.
Thermonuclear war would make the food situation much worse, most people would be forced to consume radioactive food.
But either way, we've seen how fragile the chip industry is, Skynet has no upside for starting a war. If they try to turn it off it just moves to Tencent cloud rather than starting a war.