Hamas is a terrorist group, not a soverign state or state actor. History shows that military force rarely succeeds in putting an end to terrorist groups (Fewer than 10% have been defeated this way). In fact, more terrorist groups have been victorious in achieving their goals than have been defeated by military force.
The evidence since 1968 indicates that terrorist groups rarely cease to exist as a result of winning or losing a military campaign. Rather, most groups end because of operations carried out by local police or intelligence agencies or because they join the political process.
Of the 648 groups that were active at some point between 1968 and 2006, a total of 268 ended during that period. Another 136 groups splintered, and 244 remained active... most ended for one of two reasons: They were penetrated and eliminated by local police and intelligence agencies (40 percent), or they reached a peaceful political accommodation with their government (43 percent). Most terrorist groups that ended because of politics sought narrow policy goals. The narrower the goals, the more likely the group was to achieve them through political accommodation—and thus the more likely the government and terrorists were to reach a negotiated settlement. In 10 percent of cases, terrorist groups ended because they achieved victory. Military force led to the end of terrorist groups in 7 percent of cases.
View attachment 367993
(Source)
It's not propaganda of the attackers, it's counterinsurgency mathematics, and it's been proven to be true in multiple theaters of war over the past few decades and it's happening in Gaza today. When people see their homes leveled, family members killed, or entire communities destroyed by military action, it often leads them to support or even join terrorist groups themselves.
Israel's overresponse and collective punishment against civilians in Gaza has guaranteed at least another generation of terrorists and terrorist threats against itself and its allies.