Hamas spent a large fraction of its budget to dig tunnels throughout the Gaza Strip (https://en.wikipedia.org/wiki/Palestinian_tunnel_warfare_in_the_Gaza_Strip ), but these are used only to protect militants, not the civilians above (https://www.washingtonpost.com/world/2021/05/14/gaza-tunnels-hamas-israel/ ). In contrast, Israel invested heavily in building reinforced bomb shelters in every apartment (to protect residents from incoming rockets https://en.wikipedia.org/wiki/Merkhav_Mugan ). Israel also spent a fortune to build the “Iron Dome” rocket interception system (https://en.wikipedia.org/wiki/Iron_Dome ). As a result, in spite of Hamas’ firing of over 4,000 rockets (https://www.washingtonpost.com/world/2021/08/12/hamas-rockets-war-crimes/ ), Israeli systems of self-defense were largely effective, many rockets were intercepted, and many times hits to civilian Israeli homes did not kill its residents (https://en.wikipedia.org/wiki/Palestinian_rocket_attacks_on_Israel ).

Not all the actions of the Israeli army are sufficiently well targeted to avoid civilian casualties, but Israel is doing a better job than any other army. For example, the US army has killed many thousands of innocent civilians in its conflicts throughout the Middle East, in spite of its announced intentions to keep civilians safe.

The overall balance of power between Arabs and Israelis is more complex when viewed in a wider focus than just Israel and Palestine. The Palestinians are actively aided and supported by Iran and the Arab world, a group of 22 countries (some of them very rich/large). While in recent years some Arab leaders in the region decided to accept the existence of Israel as a fact, other leaders and large sections of the Arab population call for Israel’s destruction, and have been doing so for the length of Israel’s existence.