Unfortunately, your type of thinking led to this. US involvement forced Israel to withdraw unilaterally from Gaza in 2005 and take a hands off stance as Hamas kept building up its base and digging tunnels. Had Israel stopped it back then we wouldn't have had Oct 7th and Palestinians might have taken the Israeli offer for statehood. People often confuse appeasement and peace, they are opposites.
Israel is actually mostly secular. The deep settlements are very religious in contrast to the rest. Hamas is just a religious suicide cult.
Ah yes, history started in 2005. Let's talk post-2005 then. This was when Netanyahu, an elected leader of Israel, openly bragged about aiding and building up Hamas, a terrorist organization, in order to weaken the PLO's power. That is of course, until the chickens came home to roost. It would take a certain amount of delusion to claim that this was not the issue, but unoccupying a land unlawfully occupied was the problem.
How? Trump and his loyal reps sabotaged any attempt for serious help. Biden had to resort to tricks and pushing the boundaries to offer the best he had in that situation.