It would not instantly win them the war - it more likely would provoke a direct response from Ukraine’s supporters. Further, Putin would have to go on TV explaining why it was necessary, given that state media has been shouting Russian military supremacy from the rooftops this entire time. I don’t see how he justifies it to his side, and critically, to the power brokers in Russia who support him. He would jeopardize his own situation with nukes, at least for now.
As all of the (nine?) nuclear powers know, normalizing the use of nukes on non nuclear powers will lead directly to massive proliferation, which is a nightmare scenario for Russia. Their entire geopolitical outlook depends on a world of purely bilateral agreements in which they are usually the stronger, so having to deal with more nuclear powers down the line would be seen as a major impediment.