The UN literally created a state inside another state that ideologically and religiously despises the surrounding state. It has always been a time bomb.
Most Palestinians didn't do anything. Most Yemeni didn't do anything.
Precision strikes against terrorists vs. effectively turning a country/region into a gravel pit are not quite the same thing. Israel has been leading attacks against Hamas teams for decades without much of an outcry from the international community, only once they've decided to level the entirely of Gaza.