Israel has nukes as a deterrant. If they didn't then all arab nations would mount an attack from all angles like in 1967 to destroy their nation.
The United States also has nukes. What's the difference between the US and Israel having nuked, and countries like Iraq, Iran, Syria etc. having nuked?
The answer is simple. The US and Israel would only use them in defence if nukes were launched at them, whereas those other nations would use them right away to try to destroy the US and Israel and/pr give them to terrorists. They are dictatorships, that have state sponsored terrorism, they can't be trusted with nukes.