Up until 1967, the bad guys were Britain.
Britain seized Palestine from the Ottomans during WWI with the help of the local Palestinians, promising the Palestinians sovereignty in exchange for their help overthrowing the Ottomans.
At the same time, Britain promised to create a homeland for Jews in Palestine (in the Balfour Declaration), and Jewish refugees from Europe began settling in Palestine. Britain did this because they thought they might gain the support of Jewish financiers for their war efforts. l
The Balfour Declaration was deliberately vague about whether Britain was giving all of the land to the Jews or just some of the land. It was vague because Britain wanted to appeal to Jewish Zionists (who wanted all of Palestine) while not alienating the Palestinians.
Britain never did divide the land, resulting in two different populations who felt they legally owned the land, one who had always been there, and one who mostly arrived as refugees.
When Britain left following WWII, a civil war broke out for control of the land. A border was eventually drawn at the line of control (which ran through the middle of Jersusalem), and Israelis declared the new State of Israel, while Palestinian refugees fled to their side of the border or neighbouring states. That was in 1947.
So, up until then, it’s a messy situation created by Britain, but one which eventually resulted in the land being split (albeit violently), with both Israelis and Palestians having a state, and each having part of Jerusalem. The world accepted this as the new status quo and hoped it would be sustained peacefully.
That changed in 1967 when Israel annexed the Palestinian lands (the West Bank and the Gaza Strip) in the Six Days War. Since then, Palestians have been living under a harsh Israeli occcupation as a stateless people (meaning no citizenship), with their rights and freedoms strictly curtailed. Palestinians have been resisting through a number of resistance movements, usually designated as terrorist groups in the Western media.
There was a political movement towards peace and repartitioning of the land that peaked in the 1990s, but since then it has been held up by a series of right-wing governments in Israel. Meanwhile, Israel has been aggressively building Jewish neighbourhoods (called settlements) in the formerly Palestinian lands of the West Bank.
So since 1967, Israel has pretty clearly been the bad guy.
The terrorist attack that killed 1200 young Israelis was horrific, and we should all hope nothing like that ever happens again. But the root cause of the attack was Israel’s occupation of Gaza and the West Bank. The way to prevent future terror attacks is to end the oppression of the Palestinian people.
Religion does play a role in the conflict, particularly over the question of where the border between an Israeli and Palestian state should go (so that holy sites end up on the appropriate side), but I don’t think it’s very useful to understand this as a religious conflict.
The Jews who moved to Israel in the early 20th century weren’t pilgrims. They were refugees fleeing political persecution. The founder of Zionism wasn’t even religious.
And Israel didn’t happen because religious Jews enthusiastically got behind the idea of Zionism. Israel happened because Britain got behind the idea of Zionism.
Because the Crusdaes of the 11th to 13th centuries still loom large in Western culture (Richard the Lionheart and all that), I think Westerners have a tendency to think that the situation in Israel/Palestine is a continuation of those conflicts. But it’s really not. It’s a 20th century creation.