Usually an invasion entails an intent to capture territory and occupy. A suicide terror attack is qualitatively different even if it’s large-scale. The boots on the ground could just as well have been rockets, whereas an invasion needs a longer term presence.
The last time Israel faced an existential threat from its neighbors was 1973. The timeline isn’t entirely clear, but that’s right around the time when they started to have operational nuclear weapons. Many factors contributed to their relative safety since then, but the timing certainly works out for nuclear weapons helping to make that true.