In the late 19th century a movement called Zionism arose encouraging jews from elsewhere in the world to emigrate to Palestine (then under the control of the Ottoman Empire and populated mostly by Arab muslims, with a small jewish minority) and create a jewish homeland.
In 1917 Britain issued the Balfour Declaration, which expressed support for the idea of a jewish homeland in Palestine, without dealing with how that would impact upon the indigenous population.
In the course of WWI the Ottoman Empire ceased to exist.
At the end of WWI Palestine, along with several other territories in the region, was made a "mandate" of Britain. This basically meant Britain was charged with overseeing its transition to nationhood - setting up the relevant political and judicial institutions etc.
During the interwar period Zionist migration increased. The British administrators favoured it in various ways, eg by changing laws and traditions of land ownership, exacerbating the growth of Zionism as a separatist movement. There was considerable violence between Zionist settlers and the indigenous population.
Britain considered how to deal with this violence and came up with the idea of partitioning Palestine into two countries, one jewish and one Arab muslim. The Zionists broadly supported this idea, while the Arabs (both Palestinians and surrounding Arab countries) rejected it.
At the end of WW2, the situation was exacerbated by thousands of refugees from the Nazi concentration camps arriving in Palestine. Britain couldn't come up with a satisfactory solution so said "bugger this, we've had enough", announced the mandate would be ending and left it for the UN to sort out.
The UN decided on a partition plan with a larger Israel, to account for prospective immigration over subsequent decades, and a smaller Palestine, even though at the time jews made up about a third of the population. Again this was accepted by Zionists but not by Arabs.
In 1948, in accordance with this plan, the state of Israel was declared. The Arab League immediately declared war upon it. Israel won that war and in the ensuing peace treaty the rest of Palestine was divided up - the West Bank between Israel and Transjordan, the Gaza strip to Egypt.
There was continual hostility, every so often erupting into war, between Israel and everyone else over the following decades. In 1967 after the six day war between Israel and Egypt, Jordan and Syria, which Israel won, Israel occupied the West Bank and Gaza strip, which it has controlled ever since.
Palestinians in those territories continued to rebel and refuse to accept the occupation. The UN also didn't accept it and repeatedly declared it illegal. Israel maintained that it was necessary as a security "buffer zone" against countries that sought its annihilation. As a general pattern, small and ineffective skirmishes by Palestinians would be met by overwhelming military force by Israel, killing vastly more.
In the 1980s and 1990s there were attempts to resolve the conflict and create a Palestinian state alongside Israel, but these were unsuccessful.
In 1988 Hamas was founded to fight for Palestinian statehood, with an explicit project to destroy Israel and create a single state over the whole of Palestine which would have an Arab muslim majority.
Israel continued to establish settlements in the occupied territories, treating the native Palestinians as second class citizens with few rights.
In 2005 Israel withdrew its settlements from Gaza (while maintaining and expanding them in the West Bank) and turned it over to self government, but maintained military and border control over it, restricting what could come in, who could go out etc.
In 2007 The Palestinians in Gaza elected Hamas to government. Conflict erupted intermittently between Hamas and Israel, breaking into all out war in 2014.
In 2023, Hamas staged a raid into Israeli territory, killing about 1000 - 1500 people (depending on who you believe) and taking hundreds of hostages. Israel then went into all out war, obliterating Gaza, killing over 50,000 Palestinians (which it justifies by saying it is attempting to eradicate Hamas). The Palestinian civilians have been repeatedly ordered to evacuate from one area to another, had their livelihoods destroyed and are now suffering widespread starvation. Israel has been accused of delberate genocide in order to eventually take full control of the whole area.