Nothing Hamas has done justifies what Israel is doing to Palestinian civilians, because collective punishment is a war crime. "But they did it first" is not a valid excuse, especially when trying to excuse mass starvation and bombing population centers.
Is it collective punishment or just really difficult to successful take down terrorists, destroy their weapons, and free hostages when they hide among civilians in a highly dense place? How would you suggest a country like Israel could definitely put an end to Hamas so their citizens are not experiencing risk? And how do you separate the “civilians” from Hamas when they voted for Hamas, support them today, and so on, knowing full well what their goals are (religious supremacy and genocide)?