No. Israel does NOT have the right to fight for its existence if such existence comes at the expense of - and premised literally on the extermination of - other people.
Secondly, I firmly reject the precept that Israel is "defending" itself.
Israel is an occupying power. Gaza and the West Bank are NOT "Israel's neighbours" - they are occupied territories under Israel's total control and inhabited by people to whom Israel has granted NO rights - not the right of property ownership; not the right to vote; not the right to move freely; not even the right to eat.
What happened o October 7 was NOT an attack by a hostile power. Such a construct assumes that Gazans have agency, that they have a state, that they are in control of their own borders and their own civil society, etc. - NONE OF WHICH IS TRUE.
No, Gaza is like a concentration camp, and Israel are the guards of that concentration camp. And on October 7 the inmates in the concentration camp made a prison break and struck out at the people who were responsible for their imprisonment, their privation, their starvation, their denigration, and - ultimately - their dehumanisation (as Yoav Gallant pronounced).
When it comes to the Palestinians, Israel does not have any "rights" - rather, as the Occupying Power, Israel has "obligations" under international law and the Geneva Conventions.
To address your question, "what would I have done", I would have pushed for a two-state solution in accordance with international law and the rulings of the United Nations.
I would NOT have propped up Hamas for years in order to divide the Palestinians (as Netanyahu did), but rather I would have sought to unify the Palestinian people so that they could become a single partner for peace.
I would have granted rights to the Palestinians and proclaimed an agreement to establish the two states along the 1967 borders as ordered by the UN.
I would have brought Israel into compliance with the other 64 UN resolutions that Israel is currently violating on a daily basis.
Regarding the events of October 7: I would have sought to resolve the situation peacefully; I would have negotiated for the release of the hostages with a good faith promise NOT to immediately re-arrest those we release in a hostage exchange.
Two things I would NOT have done:
1) I would not have issued the Hannibal Directive regarding Israelis being taken hostage. I would have ordered the Apache gunships and tanks NOT to fire if there were hostages present, rather than give the Hannibal order to "kill everyone" as was done.
2) I would NOT have ordered the blanket bombing of Gaza. I would NOT have resorted to collective punishment (another war crime, BTW). I would NOT have ordered Israeli troops into Gaza where Hamas fighters could slaughter them (as they are doing now).