BRICS is what Russia is trying to cling to, as it has few allies and the economy is running out. Slaves are needed, and slaves are the Brics countries.
BRICS is based on cooperation and noone is forced to join...unlike USA based organizations
So, the logic that applies to Texas - You have the right to have a gun to protect yourself from people with guns, applies to Ukraine: It has the right to have nukes to protect itself from people with nukes.
And Iran
That is pretty much the point. Once nuclear powers start using that power to impose conditions other that for defence, everyone out there is up to getting ready.
Ruzzia got nukes because US got nukes. China got nukes because Ruzzia got nukes. India got nukes because China got nukes. Pakistan got nukes because India got nukes. Israel got nukes because is in the middle of 7 countries that have waged war with them in the past, Iran may get nukes because Israel has nukes and when that happen Saudia Arabia will get nukes....
As the number of countries with nukes grows the likelyhood of a nuclear conflict grows exponentially (short of) in mathematical terms.
The solution is non-proliferation and dis-armament. None of that is going to happen if Ruzzia threatens to use nukes in Ukraine.