There is that pesky matter of the Geneva Conventions of 1949, to which Israel is a signatory, that governs the rules of war and delineates what war crimes are. What was done during WW2 only matters in the sense that the Geneva Conventions were signed so that shit wouldn't happen again.
And, yes, Hamas committed war crimes by indiscriminately murdering civilians on Oct. 7th and continues to do so by using civilians as human shields. Israel is also committing war crimes through indiscriminate bombings and forced displacement of civilians in Gaza, even when they're NOT being used as human shields.
https://www.un.org/en/genocideprevention/war-crimes.shtml
https://www.un.org/en/genocideprevention/crimes-against-humanity.shtml
While "ethnic cleansing" has not yet been defined as a war crime, the Israeli government's conduct in both Gaza and the West Bank can be easily described as such.
https://www.un.org/en/genocideprevention/ethnic-cleansing.shtml
Fighting a determined enemy without causing civilian casualties in urban areas is hard, but the conduct of a modern, professional army requires them to limit them as much as possible. It's inevitable that collateral damage will occur. But, as has been mentioned up-thread, the willingness by the IDF to throw out almost any notion of "proportionality" is all out of whack.
Meanwhile (https://www.bbc.com/news/world-middle-east-20415675😞
1.9 million Gazans (85% of the population) have been displaced;
50% of all housing units have been destroyed;
100,000 buildings have been destroyed or damaged;
and over 20,000 human beings have been killed (not verified but most experts find the estimate credible).
Finally, the "safe areas" in the south where civilians were told to relocate to are coming under increasing attack along with aid from the UN and ICRC.