We've all seen the "mighty" Russian military at this point and how pathetic it truly is. It's so gutted at this point it's sending old men to the frontlines as cannon fodder for the impending military defeat.
A last ditch effort to scare the world with a nuclear weapon would bring much of the western world into its borders to dismantle whatever military and industrial capability it has left. Any nuclear subs would be hunted by superior Navies to a watery grave.
There would be no WWIII. It would be the end of the Russian empire and all of the Russian oligarchs would carve up the remnants (Prigozhin, Kadyrov, etc).
ps- the oligarchs are likely to do it anyway, but they prefer to get the spoils before the West destroys the infrastructure.