Trials in the Hague followed by imprisonment of all those guilty of war crimes. At this point that Includes most IDF members, their leaders, and the government.
Actually bring consequences to bear and let other Israelis know that this isn’t acceptable. Israel also needs to be cut off from the teat of the American military industrial complex.
Same standards for Hamas, but that’s a much smaller number.
Any further sabre rattling is met with quick and strong sanctions.
Basically the UN needs to do it’s job, but that needs America not to veto.
Probably needs a UN peace keeping force.
…but Hamas is also a political entity and the government of Palestine. Sanctions would matter if Gaza wasn’t already blockaded by Israel.