The attack on the consulate annex was probably because one of the architects of 7th Oct was there meeting with reps from Islamic Jihad. They really didn’t attack Iran first given it looks like Iran was probably involved in planning the initial attack and have been helping and funding hezbollah and hamas for years. They have been conducting proxy campaigns against Israel for years. Even though it was an annex I still don’t think they should have bombed it.
There have been numerous attacks on Israeli consulates by PLO backed organisations and one from Islamic Jihad so it’s not unheard of. The difference is the use of proxies vs a direct attack by the actual government. I doubt Iran had nothing to do with those, the Buenos Aires one was the most likely to have been directed by Iran, the difference is hiding behind proxies instead of taking responsibility for it.
I would also gently point out that Hamas seemed to believe that the 7th October attack would be a trigger for Hezbollah and Iran to come to it’s aid in a fight against Israel, they were the ones who were actually trying to create a regional war here. They put out statements along the lines of “reminding friends of promises made” etc.
I think Israel is making sure that countries in it’s vicinity know there is a cost to attacking Israel whether thats through proxies or directly. That they don’t need de-escalation in a direct confrontation even though Iran basically said “well thats the end of that” after their strike on Israel. It seems irrational but it’s actually not if you think about it. They are communicating that a) a strike on Israel regardless of whether it was successful or not will not go unanswered b) their enemies may want to be able to harry them without consequence by bringing international pressure on them but it won’t work.
Think about it from the Israeli perspective, Iran has been threatening to wipe them out for years, they fund proxies in the region that regularly bomb them or fund attacks against them, Israel regularly kills their commanders and when they respond to the first direct attack everyone is yelling at them to stop it.
This is separate from what’s happening in Gaza atm really it moves into the realm of geopolitics.