Article 51 recognizes states' rights to individual or collective self-defense. Israel has a plausible self-defense claim based on the Iranian regime's proxy attacks against it, and its explicit mission of destroying it. If we accept that premise, then by extension Israel's allies also have a right to act in its defense.
There could also be separate arguments that the Iranian plot to assassinate Trump gives the US casus belli.
Hm, I wonder which country overthrew the Iranian government in the 50s and replaced it with a dictatorship…