The US has huge military presences in both countries, and if they really wanted to shut down funding to those institutions they could do it tomorrow.
We know that Netanyahu deliberated supported these groups to shut down opposition in Gaza by his own accord and that he has even recently asked to send more funding[1]. The talking heads also want you to believe that this is some sort of protection money out of goodwill for the poor civilians in Gaza.
I listened to some Palestinians on twitter spaces the other day and they told explained to people how the political landscape is actually a lot more complex than we are led to believe from media.
One person breaking down Hamas really well has been Brian Berletic from the new atlas[2]. Some people here might not like him, because he very much in favour of China, but I still urge everyone to take a look at his Palestine analysis.
[1] https://www.timesofisrael.com/mossad-chief-top-general-visit...
How?