Mistakes?
To be clear, before I continue further: Hamas is a terrorist organization. Hamas also has a lot of support within Palestine.
Now then, scenario 1) how, realistically, do you propose that the regular non-Hamas supporting Palestinian works to eradicate Hamas? Hamas have arms. (Let's not also forget how hard right Israeli leaders also supported Hamas, because a moderate Palestine is not really a true goal of theirs) Israel makes sure that Palestinians do not get access to weapons in general (i.e. Hamas obtains them by smuggling), 2) how do you prevent legions of new Hamas supporters being 'born' every day?
By 2, I mean, if you as a child grow up in the Gaza strip, regularly watching Merkava Israeli tanks cruising up and down your streets, often accompanied by bulldozers demolishing the homes of your friends, how are you likely to react?
Perhaps you pick up a rock and throw it at the tank. Oops. The IDF has on many occasions responded to children, throwing stones and rocks at main battle tanks, with live ammunition.
Good way to foster resentment, that. And maybe you don't support Hamas yet, but you hear of another rocket attack. The Iron Dome takes care of it, but Israel doesn't care - they turn off electricity to the entire strip for a few days in punishment. Not just your home, but your school, your hospital. Or they turn off the internet. Or phone. A few times, they even turn off fresh water.
Maybe now you start thinking you don't agree with Hamas' methods, but they're fighting for your right to survive, something the Israelis don't seem to care overly about, given their attitude to collateral damage.
Any other country on the planet responds like this, these things are considered war crimes. But when it is Israel? Not so much.
Edited to update reference to the tank type per reply.