The US absolutely fought an insurgency. They just figured out they needed local support. They got it in Iraq, they didn't get it in Afghanistan.
That's Israel's biggest problem here. They've spent the last several decades making Palestinians hate them. So there is no possible way for them to destroy Hamas.