I think it is quite obvious: to destroy the Hamas infrastructure and to kill as many Hamas militants as possible, while minimising Israeli casualties.
If you have a better suggestion for how to destroy Hamas’ ability to continue to attack Israel I’m sure they would love to hear it.
That people are stupid because they don’t have access to knowledge.