Iran, to date, has proven far more bark than bite. If Iran has, say, one or two nuclear weapons using uranium cores that would be the extent of their weapons. Making uranium nuclear bombs is difficult, expensive, and will never result in more than a handful being made. There simply isn't enough fissile material on the planet for more.
This means you have to go to plutonium production but that's obvious and problematic. What Iran is doing is trying to make a uranium bomb on the sly. If they have 2 or 3, detonate one, or declare they have 2 or 3, then the cat is out of the bag. They can declare they're a nuclear power, build plutonium production plants and make more nukes the easy way.
If on the other hand, they have 2 or 3 uranium bombs and that's all, and they launch one of those on Israel, the problem is that there's something approaching 100% chance it gets shot down on the way in. The danger there is the bomb still goes off but in say, Jordan. Or, it goes off in Israel but does little damage as it lands in a mostly unpopulated location.
Now, the Iranians have tipped their hand. The world knows they have a few nukes and so does Israel. Having used one on Israel invites retaliation in kind and the Israelis dump one or more on Iran only theirs land on target. The US and Western allies jump in and Iran gets stomped on hard and fast to the point no more ayatollahs.