Of course they have the right to try. It is literally how the world is formed. Wars have been fought and lost for millenia. Today's wars are actually far less deadly than previous centuries. You could argue that Oct 7 was the fault of Israel. OK, cool. I would disagree, but either way it, Gaza pays the price. Elections and allowing Hamas to build up have consequences for both sides. But gaza has nothing to do with Iran attempting to bomb a country and Israel's retaliation.