The Russian state, even today, came out with of a new statement saying that they considered the use of nuclear weapons to be unacceptable. Now of course this is what is declared. As to what could happen in reality, I don't know, but I would consider it very unlikely unless NATO troops were advancing on Moscow or St. Petersburg, or something like that. I think it's very much an existence-of-the-state type of weapon, rather than something that should be used for tactical purposes in a war such as in Ukraine.
Does that answer the question?
Nuclear weapons can be used to save the state, if the existence of the state is in danger. However, I don't think they would be used to win the war in Ukraine.