A combination of external and internal factors.
The territory of Palestine was a League of Nations Mandate created after World War 1 and given to Britain to rule under a 50 year mandate.
The British could not control the situation as it deteriorated in the inter war period and after World War 2 the UN took over, It divided the territory between the Jews and Palestinians and the Jewish territory became Israel.
Israel was immediately attacked by her Arab neighbours. The war resulted in total victory for the Israelis.
At the end of the first Arab-Israeli war 1948-49 the Palestinians had lost all the territory given to them by the UN which of course expanded Israel's borders and created the Palestinian refugees.