Yeah, "just build nukes".
If it was that simple, every one would have them. And even then its probably the worst choice they could make at the moment..
More like the best choice. If you don't want to be invaded, you need nukes. Any country that had nukes and gets rid of them is just asking to be invaded. Libya got rid of their nukes, got invaded, collapsed. Ukraine got rid of their nukes, got invaded, got abandoned by the US. Canada got rid of their nukes, Trump is talking about annexing the country. I guarantee Trump would be a lot more polite to the Canadians if they had something they could point right at Mar A Lago and go "Invade us at your fucking peril".
That is the kind of escalation nobody will survive.
So Ukraine builds a nuke. Maybe a few nukes, even. How many more nukes do you think Russia has? How many active anti-nuke systems do you think Russia has? Do you truly believe Ukraine having nukes will somehow deter Russia, or wouldn't think that Russia would consider that an excuse to do even more damage?
It doesn't matter how many nukes Russia has, or how many anti-nuke systems they have. Ukraine only needs to get lucky once. That fear will make Russia back off. It works for North Korea, it can work for Ukraine. The US is unreliable at best and a bunch of lying traitorous scum at worst, so there's no point in relying on them for anything. The ONLY way a country can protect itself from invasion these days is to have a "I'm taking the entire world with me" button.
That's not how it works. MAD requires an existential threat to a country. Not simply the ability to maybe take out one city. You have to have the capability to completely destroy a country for MAD to take effect.
You also need second strike capability otherwise that one nuke is a target. Russia figures out where Ukraine's nuclear weapons are location, they do a first strike. There's a reason why most nuclear powers have submarines capable of nuclear strikes. Hard to take them out with a first strike.