To me it seems like Gaza had no intention to get rid of Hamas though at the same time bombing is unnecessary.
There hasn't been elections for 16 or 17 iirc so how can Palestinians "get rid of" Hamas?
Hamas was supported & funded by Netanyahus likud party specifically because it drove a wedge between those in Gaza and in the West Bank. Classic divide and conquer technique.
As for what Israel can do? They can get rid of the genocidal crook that's running their government and his two murderous far right henchmen and grasp that he had concocted this situation for several reasons:
To divert attention away from his corruption and fraud indictments
To quell the protests that have been going on for months against him because of the corruption and legislation he has passed to curtail the supreme courts ability to hold the executive to account.
To level Gaza, ethnically cleanse it & genocide the Palestinian people so he can get to the natural gas and oil reserves there.
Yes, there's a lot Israel can do and it needs to be quick about it.