Remember, you can't defeat a Global nuclear superpower.
I wonder what is the basis for your assertion that it is impossible to defeat a nuclear power, which, as follows from the text, means Russia? Everything happens for the first time. Until the recent attack by the Ukrainian Armed Forces on the port of Russian-occupied Sevastopol, there had never been a case of a missile hitting a submarine. Ukraine has successfully opened such an account.
Do you mean that Russia, with a military defeat from Ukraine, will begin to bomb Ukraine with nuclear strikes or even the whole world? Firstly, Ukraine does not yet intend to seize Russian territory within its internationally recognized borders. That is, Ukraine is not going to attack Russia, but is only defending its independence and territorial integrity. Whatever the outcome, it should be clear to sensible Russians that in this war Russia is attacking, not defending, and therefore the need to use nuclear weapons on a neighboring country, receive nuclear contamination from their own bombs and die from it is completely absurd.
Secondly, in order to use nuclear weapons, in Russia the president must transmit a code signal to unlock nuclear weapons and thereby authorize their use. This signal is transmitted through a portable nuclear briefcase control system. The Minister of Defense and the Chief of the General Staff have the same devices. The actual possibility of a nuclear strike is feasible if permission comes from all three devices. Then the signal goes to a special service of the General Staff, which, in turn, transmits the order to the specific command in whose location the nuclear forces are located. After this - from the command to the specific officer responsible for the actual launch. In addition, the president is always accompanied by a group of General Staff officers responsible for the “nuclear briefcase.” The chain is long enough, so it seems to be foolproof. On the other hand, if this fool nevertheless decides to use nuclear weapons, will all the military in this chain want to carry out this criminal order and expose themselves, their relatives, loved ones, and so on to the danger of destruction?
As for non-strategic (tactical) nuclear weapons, the chain is even longer. The troops do not have tactical warheads. It must be picked up from a centralized storage warehouse, transported, media prepared, loaded, and military training conducted. It's a long chain, and at every step there may be doubts about whether we really want it. In addition, all this is tracked. US and NATO intelligence will quickly discover this, and NATO has developed, in case of such a danger of using nuclear weapons, a preventive non-nuclear strike, as a result of which any such state will cease to exist within thirty minutes.
Now some states are simply afraid that as a result of long-term military failures in Ukraine, a wave of protests and centrifugal influences may rise in Russia itself, which in turn could lead to the disintegration of Russia into a number of separate independent state entities and nuclear weapons will fall into the hands of uncontrolled individuals. All other options for the use of nuclear weapons are still unrealistic, even if Russia loses to Ukraine in this war.