Hamas wouldn't exist without Israel's direct help. They directly funded and helped create the group in its infancy because they thought it would be easier to control than the other more democratically elected parties.
Fast forward to modern day and they still propped up and funded Hamas because of the hunger for power.
https://www.nytimes.com/2023/12/10/world/middleeast/israel-qatar-money-prop-up-hamas.html