Not really. Most countries don't face realistic threat of invasion, especially post world war 2.
Over the last 50 years, the probability of anyone invading france, canada, australia, etc has been next to 0. The only countries that really had to worry are the ones that straddle the regions of influence during the cold war.
But that's mostly true because those countries are rich and fly half the world away to attack poorer countries and usually by bombing them from far away. Eg syrians can't realistically gather enough money and weapons and planes and bombs to bomb paris. Or iraqis london. Etc. On the other hand, they can gather a few fanatics, give them guns and have them shoot a bunch of people, or bomb something, or worse. But then we get the "why did those people get radicalized? was it GTA?" articles.
TBH, considering the number of dead in palestine and the number of people in europe/us who literally lost everyone who ever mattered to them, the number of "terrorist" attacks seems relatively low.
Why is that relavent? The point is that some countries have more immediate security fears then others. It doesn't matter what structural factors lead to that. Countries with realistic security fears are going to invest differently than those that don't. Countries like people do whatever they think is in their best interest.
If your point is the world is unfair, then yes obviously that is true, nobody disputes that.
If france decided they needed to exert their "political pressure" over eg. germany, they'd have the same problem and all the realistic security fears, because germany is a rich country and they share a border. Same for the opposite direction with a few more historic events related to that. Same with france vs uk wars, and many many other wars in europe.
But hey, having your capital cities bombed is expensive, transport is cheap, and so it's easier to bully countries in a different continent, eventually bomb and invade them, becuase you're pretty sure they won't be able reach you back home with conventional war means (planes, rockets, tanks,...).
And yes, it's relevant, some politicians in one of those "safe" countries decided to bomb some country in a different continent, and you, a normal football fan or a party goer get killed when those people come and fight back in "unconventional means" (eg 2015 in paris). Somehow no one treats those as "we're at war with them, we bombed them first, they're just fighting back".
Pre-1967 Israel didn't control the West Bank or Gaza. So most of the bad stuff people claim about Israel today didn't really exist.
Yet all its neighbours wanted to destroy it.
Lebanon who in theory should have no dispute with Israel bombarded it with ten's of thousands of rockets, mortars, anti-tank munitions etc. After Oct 7th.
The bit you're missing in your overly simplistic analysis is that Israel is really surrounded/attacked by a single religious/political ideology. There is no "everybody else here".
And what you are missing is that Israel acts don't call for friendship even in the people that would want this friendship.
Israel has stolen as much military and industrial secrets from US as they could grab. Has violated every international law. There are strong suspicions to be behind Epstein honey trap for riches and politicians all around USA and Europe. Has funded Hamas. Has an horrible relationship with human rights, longer than the bible. Has called non Jews "human animals", and acted accordingly, even to the point of doing competitions about "who can destroy more kneecaps or shoot more testicles in a week", among starving people that were trying to obtain food none less. Has treated 5Yo children like partridges in a hunting party. Has killed thousands of journalists, doctors, nurses and NGO staff without even trying to pretend that they care. Has put spy devices in friend's phones each time they could. Was caught messing with the elections in UK. Has used, discarded, and left each politician that supported them, alone and hanging dry in the elections, from Biden, to Trump, to Merz.
US does not want the demise of Israel, but Israel does not even try to pretend that they respect the opinion of US. Even after all this time, is all grab and cash. And US is always cleaning the mess that they left behind.
And the only thing that we can hear from them is "Why everybody hates us?" Really?. Clean your acts first.
China has stolen x1000000 secrets from the US. Everyone spies on everyone. Israel relatively less. So that assumption is just baseless.
"Has violated every international law". Baseless. Violates less "international laws" than most western countries, not to speak of the rest of the world. I mean "international law" isn't really a thing, it's a series of treaties.
Called non-Jews "human animals". Just the Hamas and the perpetrators of Oct 7th. And rightly so. I mean animal is a compliment to those people. (all humans are animals really).
I don't know where you're getting all of this from. But it's an alternate reality. It is not factual. It is putting Israel under a microscope when most of the world behaves much worse. There are dozens of countries with much worse human rights violations than Israel is even accused of. And many of those accusations are outright lies. That's not to say every Israeli soldier is perfect or that Israel is perfect, but it's certainly better than e.g. anything the west did when it went after ISIS/ISIL or Al Qaeda or pretty much any other war waged by the west. And the west is better than the rest of the world by far.
You are just echoing propaganda here. And that's the reality of why people hate Israel. Because they are bombarded by propaganda that tells them to hate Israel. If you actually are able to zoom out of that you will see it as well. That plus antisemitism.
EDIT: You are right that Israel isn't spending a ton of cycles trying to get e.g. Europe and Americans to "like it". Between the choice of e.g. winning the war in Gaza and e.g. giving up to Biden's demands (e.g.) Israel has chosen that it must win the war. The American left, media, and universities, e.g. are structurally biased against Israel. They are regurgitating cold war USSR narratives. This is the result of more than two decades of anti-Israeli propaganda. Israel sometimes has to cut its losses. It can't out compete the resources of Qatar, Russia, and China e.g. who are out to splinter the US by whatever means possible. It could do better but between "making friends" and a decisive win against Hamas which is crucial for its future security it will pick the decisive win.
Look at the media coverage regarding Israel's continued pressure on Hamas since the ceasefire. Israel keeps eliminating Hamas commanders, it's eliminating people who were part of the Oct 7th raid into Israel, it's eliminating infrastructure used for military purposes, it's eliminating people who have held hostages. What the media is reporting is simply that Israel is "violating the ceasefire" and "killing Palestinians". That narrative is false. If you believe it then you're going to "hate Israel" as you are programmed to do. But Israel like any other country has the right to win against Hamas in this war Hamas started.
EDIT2: Also reality is complex. So we do have things like an extremist right wing government who is turning a blind eye to violence against Palestinians in the West Bank. However that tends to be blown out of proportion. We see western media simply not reporting on Palestinian violence against Israelis. Just like they didn't report Hezbollah's attacks on northern Israel. The evacuation of the population there. And generally anything that puts Israel in a possible light as being the one defending itself. So if you consume simply a one sided picture you're going to end up with a one sided picture view. And the wrong view. You won't understand e.g. why Israel went into Lebanon if you never heard about the scale of attacks on Israel originating from Lebanon. Israel isn't always right, and ofcourse attacks on innocents are never justified, but those are some small pieces of a big picture, and you're only getting those pieces. From Gaza you are basically getting 100% Hamas controlled views which the media repeats as facts (journalists, doctors, etc.). When media talks about Palestinians in the west bank it also immediately whitewashes everyone into civilians. In fact there are armed factions operating in the West Bank and a lot of the overall violence (not the settlers vs. random innocent) is towards dismantling those.
Over the last 50 years, the probability of anyone invading france, canada, australia, etc has been next to 0. The only countries that really had to worry are the ones that straddle the regions of influence during the cold war.