You cannot declare war on a territory you occupy and control. It is as if the United States declared war on Washington DC or any of their numerous prisons.
Israel neither occupied nor controlled the Gaza interior prior to Hamas' attack. They only controlled the border and what goes in and out of Gaza (some cross border tunnels excepted). Within Gaza, Hamas and the Palistinian National Authority ruled.
> They only controlled the border and what goes in and out of Gaza
"only" is used here to diminish the suffering of the Gazan people. Israel has had Gaza under a brutal blockade, across air, land and sea. They control everything that enters or leaves, and infamously were so cruel they counted the calories entering Gaza [0] [1]. Israel even claims control of the air over Gaza, and prevents civilians from collecting rainwater [2] [3] [4].
Israel has been enforcing collective punishment for decades - they want that land, and they want it only for themselves.
Israel certainly has agreements and treaties with Egypt that would make it difficult for Egypt not to do what the Israelis say regarding the border. Agreements and treaties made at a time and situation where Egypt didn't have much leverage.
Egypt is not free, for example, to allow aid in that Israel has not specifically approved.
You can read quotes from Israeli officials about their approval process for the Rafah crossing. They've also bombed the crossing when they feel like the process isn't being followed.
I'm not entirely sure what you mean by that statement, but I guess you're somehow implying it's not US-backed Israel's fault that they prevents legitimate goods (such as crayons, seeds, fishing rods etc) from entering Gaza... because Egypt?
Whataboutism aside, it's well known that US-backed Israel is indeed largely in control of what Egypt does and does not do in regard to Gaza.
They did both... They control everything that goes in and out of gaza:
I quote from MSNBC "Despite pleas from the United Nations and human rights groups, Israel has maintained a land, air and sea blockade on Gaza since 2007 that has had a devastating effect on Palestinian civilians."
How do you rule if you control nothing? all the utilities are controlled by Israel. Travel, nope, controlled by Israel. Exports, nope, controlled by Israel. What are they ruling?
Israel created Hamas to weaken the Palestinian Authority - which itself is severely corrupt and complacent. People are seeking a better life. How else do you think Trump got elected? was he the better candidate? (and yes, I did just conflate Trump and Hamas)
I think it would be appropriate to put Hamas leadership, Trump, Biden and Bibi all in there along with a host of others. They're all produced by the same awful games that reward powerful, reprehensible men, promoting even those with majority disapproval to the top of the chain.
And then the same vagueness is the same tactics used by the most well funded, the most sophisticated propaganda machine ever - to make people think being against the actions of their current Israeli government, e.g. war crimes they're committing and have been committing, is anti-Semitism.