Israel has both defended itself from literal invasions neighboring countries and violently seized ("colonized") land from people already living there. The two are not mutually incompatible.
What do you mean by "literal invasion"? It seems to imply that Israel would have been attacked without provocation.
In 1948 the zionist paramilitaries had been at war with the indigenous population for quite some time, neighbouring states offering the palestinians military support once the british ended the mandate wasn't exactly out of the blue.
The 1956 Suez crisis was an attack by Israel and some of its allies.
The 1967 Six-Day-war was an attack by Israel.
The 1973 Yom Kippur war was an attempt to retake syrian and egyptian territory, and 'invading' occupied territory in an attempt to retake it is hardly a "literal invasion" of Israel, right?
In 1982 Israel attacked Lebanon and invaded its southern parts.
Quite consistently Israel has been the aggressor and very explicitly expansionist at the expense of its neighbours.
You seem to believe that Israel is not a legitimate state, and have stated quite a bit of misinformation in your comment. Looking at it as someone without a dog in the fight, you seem comically one-sided in your analysis.
> In 1948 the zionist paramilitaries had been at war with the indigenous population for quite some time
As of May 1948, these were not 'zionist paramiltaries', they were the Israeli army.
>The 1956 Suez crisis was an attack by Israel and some of its allies.
From 1949 Egypt had repeatedly blocked Israeli‐flagged vessels from the Suez Canal and the Straits of Tiran. State-enabled terrorists were also doing armed raids into southern Israel, killing and wounding civilians (over 200 casualties in 1955 alone)
> The 1967 Six-Day-war was an attack by Israel
In May 1967 Egypt expelled the UN Emergency Force from Sinai, massed tens of thousands of troops on Israel’s border, and formally closed the Straits of Tiran
> The 1973 Yom Kippur war was an attempt to retake syrian and egyptian territory
On 6 October 1973 Egypt and Syria launched a coordinated, surprise attack across the 1967 cease‑fire lines on the holiest day of the Jewish calendar (Yom Kippur)
> In 1982 Israel attacked Lebanon and invaded its southern parts
From 1968 onward the PLO used southern Lebanon as a base for rocket and commando raids into northern Israel.
It's not, apartheid states as well as colonies are direly lacking in legitimacy.
Until 1955 Nasser was working with the israelis to achieve border security and find a non-violent solution to the rather large amount of palestinians with rather well-founded grievances that were taking advantage of the porous border. The Lavon affair occured in 1954. In February 1955 an israeli military group under Ariel Sharon attacked the egyptian army, after which Nasser changed his mind about the israelis and started actively supporting the palestinian 'fedayeen'.
Such attacks by Israel in Egypt were aimed at keeping british colonial influence alive, i.e. attempts to use the illegitimate force of another state to subjugate a neighbour. In 1973 Israel had consistently declined peace offers and made even the usians furious with their disinterest in a negotiated solution with Egypt and Syria. One should note that the cease-fire lines weren't at the israeli borders.
Around 1968 the aim of the PLO was to liberate Palestine from the jewish supremacist apartheid colony and establish a democratic state in its place, which, of course, was unacceptable to the zionist movement. The reason they resided in Lebanon was the illegal displacement of hundreds of thousands of palestinians into lebanese territory, which wasn't exactly a stabilising factor in Lebanon. Israel consistently demanded that the lebanese state should solve the problem that the israelis had forced upon it and performed 'retaliations' against lebanese civilian targets for PLO actions.
Israel also undermined lebanese political institutions by supporting christian militants, basically fomenting a civil war and trying to coerce its neighbour to install a particular government.
Consistently Israel invades, occupies, displaces and then starts to destroy homes, historical and religious sites, as well as agrarian and other civilian infrastructure. This is the main reason for Israel's dependence on conflict mines in Africa, and USA delivering oil and weaponry. More recently, as another line of revenue, Israel has developed a systematic use of its tyranny for the design and dissemination of technological tools that are used for oppressive purposes all over the world.
It's a criminal, illegitimate state predicated on the extermination of indigenous societies in its region, which is currently enacting a genocide and implicating a bunch of occidental states in it. In effect this is destroying the post-WWII international judicial order and the UN system, and will likely bring back the limitless forms of colonial and imperial violence that preceded the world wars. Russia has already taken note and ramped up its crimes against Ukraine.