When Israel launched a war against the Gaza Strip in August 2022, it declared that its target was the Islamic Jihad only. Indeed, neither Hamas nor the other Gaza-based groups engaged directly in the fighting.
english.palinfo.com
For Israel, wars in Gaza have proved progressively harder with time. For example, Israel's so-called 'Protective Edge' in 2014 was very costly in terms of loss of lives among the invading troops. In May 2021, the so-called 'Breaking Dawn' was an even bigger flop. That war unified the Palestinians and served as a strategic blow to Israel, without considerably advancing Israeli military interests.