i don't believe Iran has avoided getting weapons out of a faith in the west or flawed understanding of what they would do to protect them, but because other priorities have been more pressing in recent years
In that regard being close to having nukes already gives you much of the leverage of having them. Countries don't build nukes because they plan on actually using them. It's about the threat, which still exists to a large extent if you are close to getting the bomb. But without the cost of maintaining nukes.
Investing in missile and nuclear technology is worth it because that tech can be used for other applications. Actual nukes just sit in a warehouse until they have to be replaced.
The resistance knows better than us what is at stake and what an all-out war would look like. Although it almost certainly wouldn't entail less Palestinians dying.