Israel has been a target and on the receiving end of attacks from it's "Peaceful Muslim" neighbors ever since the UN set the partition of Israel and fake "Palestine" in 1948. That initial war in 1948 sought to wipe out Israel and the Jews there. All the attacks/wars since then have had the same goal. Many have been funded and supported by the theocracy in Iran.
The Oct. 7, 2024 attack was similar and the coward Hamas (funded and armed by Iran) used the people and land of Gaza as a shield and base of operation. If Israel didn't try to eliminate Hamas from Gaza Hamas would have continued to attack.
Goal of that 1948 war against Israel was to take their land after defeating the new nation and "removing" the Jews. The Muslim attacks set those terms and have stuck by them as well as never ending their attacks and wars against Israel. Since the terms are all or nothing, Israel has a right to keep lands taken from their enemies.
Muslims are ready control dozens of more land area on Earth than the land of Israel. If the Muslims would stop and let Israel be, then a lot of the violence might stop.
I say might because part of the dogma of Islam is Muhammad's command before he passed-on that his followers must spread Islam over the whole of Earth.