You might be surprised to find out that the last 6 months is just 1/140th of the war history there. You might not also be aware of the fact that the entire purpose of the Hamas attack on Oct 7 was to provoke Israel with sufficient atrocities to put PALESTINIAN civilians in deadly harm.
This is the kind of perverse incentive that is key to Hamas' long term goal, the destruction of Israel, and Hamas has taken care to draw Israeli fire on those children. When paired with a right wing Israeli government, which like Hamas wants to destroy any chance of a two state solution and any chance of a peace that could lead to it, war is inevitable.
Not sure if there is anything the people of Gaza could have done about Hamas, who stole vast sums of money intended to develop Gaza and diverted them to build out that tiny strip of land as a war platform. Had the people been able to take back control from the extremists determined to use them to create outrage throughout the region and reignite regional war, there's no telling what they could have built instead.