Traditional utilitarian arguments are out of place here, unless you realistically apply game theory and only consider Nash equilibrium outcomes. Otherwise you end up comparing the present outcome you don't like to a fantasy outcome that could never be.
On October 7th Hamas killed or captured ~1400 Israelis in an indiscriminate and violent cross-border attack, then unleashed a barrage of rockets on Israeli cities. Many failed, and the iron dome intercepted most of those that got through, but not all, and at great cost.
This was an active state of war, started by Hamas, not Israel. Hamas uses the people of Gaza as disposable human shields. These militants will use every unfair trick to gain advantage and kill more Israelis. They have consistently violated cease fires in the past, and turned humanitarian aid into instruments of war (the rockets, for example, are built using water pipes provided by European countries for the Gazan people).
Evil regimes that treat their own people as disposable need to be gotten rid of, and are unwilling to negotiate in good faith for a settlement. War is really the only viable option here, and the IDF tactics have been chosen to make this war as quick as possible, for a variety of reasons including the safety of the populace.