This is all ancient and well-trod history, but it sure seems like a lot of people no longer have much understanding of how Israel originated, and why it is where it is. So here's a very brief Beginner's Refresher to Israel.
Before the First World War, the area we now call the Middle East was part of the vast Ottoman Empire:
The Ottoman Empire decided to enter World War I on the German side, which turned out to be a big mistake. After the war it was dismembered in the Treaty of Versailles, leading eventually to the creation (or consolidation) of Turkey and Saudi Arabia. In addition, shortly after the treaty was signed Great Britain was given the "Mandate for Palestine," ex-Ottoman territory it was authorized to control under the supervision of the League of Nations:
Several years before this, in the Balfour Declaration, Britain had already declared its support for a Jewish homeland in Palestine—a recognition of the Zionist movement that had begun among European Jews a few decades earlier. This was formally recognized in the final document from the League of Nations creating the Mandate. The next couple of decades after that were relatively quiet, producing plenty of fighting in Palestine but nothing definitive.
The League of Nations finally dissolved after World War II and was replaced by the United Nations. In 1948, driven by both historical currents and the shock of the Holocaust, the UN created the state of Israel on the western side of the Mandate, while the British turned over the eastern side to the new Kingdom of Jordan. The area known today as the West Bank (i.e., west of the river Jordan) was held back as a proposed Arab state.
A few days after the creation of Israel, Arab nations declared war. They lost, but Jordan annexed the West Bank and East Jerusalem, while Israel took control of West Jerusalem. In 1967 Arabs declared another war. They lost, and Israel took over the West Bank and East Jerusalem from Jordan and the Gaza Strip from Egypt. In 1973 Arabs declared yet another war, and lost yet again.
Around this time Israel began building settlements in the West Bank. In 1979, they signed a peace treaty with Egypt in which Egypt renounced all claims to Gaza.
In 1987, Palestinians waged another war against Israel, the First Intifada. They lost. After the collapse of the 2000 Camp David peace talks, they waged a Second Intifada and lost again.
In 2005 Israel withdrew from Gaza and in 2006 the residents of Gaza voted Hamas into power. Egypt and Israel then put in place a blockade surrounding Gaza that continues to the present day. In 2023 Hamas launched a deadly attack against Israel, torturing and killing thousands of civilians. Like Israel's other enemies, they will undoubtedly lose yet again.
In the meantime, Israel has expanded its West Bank settlements tremendously:
The Palestinian areas of the West Bank are now so chopped up that it's difficult to imagine any plausible creation of a Palestinian state there. For this and other reasons, the so-called "two-state" solution to the Israeli-Palestinian conflict is all but dead. It continues a sort of zombie-like existence, but no one really believes it will happen anytime in the foreseeable future.