Agreed that this wouldn't have happened if Iran got nukes before hand. But at this point of open conflict Iran does posses the capabilities to hit sensitive targets that would still amount to a form of mutually assured destruction.
Nukes serve to prevent this type of open conflict. But now that it's here, building nukes is probably not worth it until there is a ceasefire.
The details don't matter because neither side actually wants peace right now. At the beginning of the SMO you saw the same thing: every country that wanted to profile themselves internationally seemed to be promoting their own peace talk initiatives.
Everybody knows neither side of the conflict can force the other to give in to their demands right now. Just like with Ukraine, everybody will keep talking about being open to 'serious' peace negotiations.