Iran allows IAEA inspections, and gets bombed in return. Israel isn’t even in the NPT and there is no consequence at all for that.
Libya rolled back its WMD program in 2003 and was invaded within a decade. Iran is not meant to see that.
For decades Israel makes no disclosure about its nuclear capability, rolls back nothing, and has stolen US material and passed on US secrets (as admitted by Jonathan Pollard - a spy given a hero's welcome upon his arrival in Israel).