Did you bother to look into this at all, before repeating it? Or was 'it's all about the oil' combined with 'everyone knows Israel...' just too tempting?
Gaza is 25 miles long, and has a correspondingly tiny slice of 'Exclusive Economic Zone' in the sea off Gaza.
There are 2 very small oil fields in Gaza's zone: Marine 1 and 2. They're much, much smaller than the oil fields much further north, off Israel's coast between Tel Aviv and Haifa. And really not worth any kind of conflict, although the income could have helped the Palestinians.
In June 2023, the US had brokered a deal between Israel, Egypt and the Palestinian Authority for the PA to develop Gaza's 2 oil fields. Hamas was to get a share of the profit, which everyone agreed they would have the right to decide how to invest "to develop the economic and political situations for their people". Israel agreed to that, having received strong guarantees from Egypt that Hamas wouldn't use its share of the gas revenues to develop its weapons, and that Hamas were ready to sign a long-term truce with Israel.
Well, we all know what happened next. Just 4 months later, Hamas committed the October 7th atrocities.
The Gazan oil field development obviously stopped.