Sinwar didn't want a two state solution.
This was a religious war meant to kill Jews and take over Israel.
Hamas was likely promised that Iran would back them, and they got fucked.
There was no genocide. Hamas attacked first, murdered civilians, and took hostages. Israel has a right to respond and defend itself.