That's not true.Iran’s nuclear program posses no threat to Israel. In fact many within Israeli destablishment believe the government has been focusing on Iran in order to avoid critical domestic issues.
Let’s be honest, even if Islam says nukes are allowed. The use of nuclear weapons especially on a holy city (Jerusalem) is beyond haram.
The Israelis don’t care about Iran’s nuclear weapons program they care about Iran’s nuclear weapons program leading to normalization of ties with the world which in turn would allow Iran’s economy and society to grow and in turn the conventional war machine would completely overrun Israeli and Arab armies combined.
The perception among the top brass in Israel is that Iran's nuclear program poses a critical threat to Israel's security and existence.
The worry is not necessarily that Iran would use a nuclear weapon against it, but that a nuclear powered Iran would increase its agressive posture in the region and that it, under its nuclear umbrella, would further bolster and advance its regional-military footprint.
If Iran would have been nuclear, how likely do you think it would've been for Israel to strike Iranian targets in Syria and elsewhere? The fact that in such scenario Iran would've been able to convincingly move upwards on the escalation ladder, with Israel having less space to manoeuvre due to a lack of strategic depth, makes this hypothetical scenario a potential strategic nightmare for our Jewish friends.
This lies at the heart of their worries. That they would be completely paralyzed against a fully confident and nuclear armed Iran. From what I've read, they even fear that such scenario would give them less room to manoeuvre against Iran's allied proxy groups. It would completely shatter their morale.