There are three points of having nukes:
1. Deter other countries with nukes from using them against you, or your military ally.
2. Prevent total annihilation in the war. You can lose the war, but not too much.
3. Burn the world to ashes. Very few countries can do it. It effectively forces the whole world to make sure that this scenario does not happen. So you can be sure that scenario where Ukraine conquers Russia and completely destroys it - will be prevented by the very Ukraine supporters. They don't want to live in the nuclear post-apocalypse, because there are scenarios where Russia fires every single nuclear missile on every major city on the Earth. As Putin framed it: We will go to heaven as martyrs, and they will simply drop dead.
America lost several wars, recently they lost Afghanistan war and right now they're losing Iran war. They won't invoke nukes to overturn the table, they'll accept the lose.
How do you know? Trump's frustration is on the rise; at some point he very well may threaten nuclear strikes.
Another scenario is, he tries to invade, an Iranian drone makes it through and sinks a big US ship, hundreds or even thousands of American soldiers die in a very short period of time. Now everyone's upset and the American public screams "revenge".
Then anything can happen, really.
The problem with the post ww2 world is that the old definition of winning a war no longer holds. You just don’t see wars of conquest very often and they don’t seem to work when they happen.
The closest I can think to winning off hand is a few of the colonial civil wars. Vietnam for instance won in the sense that they outlasted the US and have a nominally communist government but it is not an outpost of the Soviet Union and it’s a major trading and tourist partner of the US.
Iraq is not led by a belligerent to the US dictator and Afghanistan isn’t home to training camps for terrorists dedicated to attacking the US (yet).
These were all extremely stupid, expensive and inhumane military actions. But the US never went into them to hold territory. So “there until we got tired of it” is as close to winning as it was ever going to be.
Nobody is disputing the fact that the US spends more money on arms than anyone else and has the shiniest of toys as a result, but "winning" in war is about effecting the outcomes that you want, not about whether your weapon systems are superior.
The US military has clearly failed to deliver the outcome that Americans wanted in many recent conflicts (Vietnam, Taliban); counting those wars as "lost" makes a lot of sense.
You are making the folly of thinking of war like lawsuits, where one side wins and the other side loses, and the losing side goes home with nothing. This is not so.
If you're walking home from work and some person tries to mug you, even if they are unsuccessful, that will permanently change your behavior as if they had successfully robbed you anyway. Maybe you'll change your route. Maybe you won't walk and drive instead.
Is it strategic deterrence, or just being so unreliably and inconsistent that insider information becomes more valuable?
Is it strategic to demonstrate a lack of planning or that you are a poor ally incapable of garnering support (either domestically or abroad)?
Then there's nuclear defenses - if a country would have an effective anti-ICBM system (like Star Wars or whatever), it would make a nuclear counterstrike ineffective and end Mutually Assured Destruction. On paper anyway, in practice there are no perfect anti-ICBM systems, and they're effectively cluster bombs so in theory after the initial launch they can break up into half a dozen "dumb" nukes. Good luck hitting those.
I mean I guess that's one way to talk about a country that shoots back when it is invaded!