How is it that in Tel Aviv, two Palestinian terrorists with machine guns in a crowded restaurant and market area (Sarona) managed to kill only 3 people while in Orlando Florida, one gunman with an assault rifle in a nightclub managed to kill 49 people. Certainly there are differences, but the outcome is strikingly different. One reason is that Israelis are somehow prepared for this kind of attack, there have unfortunately been so many such attacks over the years that Israelis are “used” to them. Israelis tend to run towards an attack and many Israelis carry guns and have been in the military (the IDF is a conscript army), they tend to “fight back.” In Orlando this was not the case.
I cannot say for certain, but I know that the Israeli response time to such an attack is minutes, whereas in Orlando the response was piecemeal, some local police came, then State police, then the FBI, not a specific anti-terrorist unit, it was not efficient and coordinated from the very beginning. In Israel such attacks with guns have been less common recently, mainly because of good intelligence by the security authorities as well as the fact that all public places have guards on them by law. It is thought that the two Palestinians managed to get into Israel through a gap in the security fence, that has been known to authorities, but not repaired. How they managed to bring their guns into the restaurant has not been reported.
Israel remains a vibrant and active democracy even while under constant threat of terrorist attack. Some have argued that the US needs to learn from the Israeli example (see https://www.algemeiner.com/2016/06/15/in-wake-of-jihadist-orlando-massacre-us-pundits-urge-america-to-learn-from-israel/), for example by having guards at the entrance to all Malls and public areas, and profiling people so as to more likely catch potential terrorists before they have the chance to act. You can do this (as Donald Trump suggested) or you can continue to have higher casualties.