Gangs of Hamas terrorists launched a violent assault on Israel, indiscriminately raping and killing women and children, torturing its soldiers, and taking hostages
Hamas is a single organization and there was nothing indiscriminate about the attack. Taking hostages in Israel and getting them back to Gaza before Israel could react took a lot of planning.
The indiscriminate bombing of Gaza appeared more as an act of desperation rather than a well-planned military campaign.
It was messy but that was one of the goals. The government of Israel wants to depopulate the Gaza strip and send the Palestinians someplace else. Destroying the housing, roads and support systems in Gaza to the point that the Palestinians can’t live there helps justify Israel forcing them out.
Therefore, terror cannot be defeated through conventional warfare. The terror can be conquered only with greater terror
Trying to deal with terrorists through more terror makes you a bigger monster and never really solves the problem. The real solution to dealing with terrorists is giving the population an alternative. Israel never wanted to do that because they never wanted a viable Palestinian state or government.