It's pretty straight-forward and has been for decades: conventional forces go first; if you begin losing badly, then you pull the nuclear card to prevent any meaningful territorial losses; the war ends in some variation of a stalemate.
Whether they can make it work that way in practice, hopefully we'll never find out. The biggest challenge to the practice of it, is dealing with even small existing territorial losses when the nuclear card comes out. Countries like Pakistan and North Korea may also not function that way, hard to guess about their operations under pressure just due to the nature of their brittle regimes, but most of their leadership also likely wants to live.
"It's pretty straight-forward and has been for decades: conventional forces go first; if you begin losing badly, then you pull the nuclear card to prevent any meaningful territorial losses; the war ends in some variation of a stalemate."
Exactly where have nuclear weapons used "for decades" in this way?
They are "used" passively. Any country that has the ability to create a nuclear explosion is constantly using them as diplomatic leverage. Even if you don't detonate them, even if you don't talk about them directly, the capability alone shapes reality.
Parent was
"One of the big worries I have is that a losing super power would turn to nukes once conventional weapons stores are exhausted."