Depends on the wasp/bee species. Not all of them swarm. Also, ants are related to wasps, and you will see similar behavior with them.
I had a friend, when I was a kid, that shot a white-faced hornet nest (not actually hornets -they are big yellowjackets -even worse) with a BB gun, from, like, 50 meters away.
The hornets figured out who shot their nest, and swarmed him. May have just been that they attacked any nearby critters, but he certainly paid for his folly.
White-faced hornets are better to have in your yard, than yellowjackets. They are a lot less aggressive, only attacking if their nest is at risk. They also eat yellowjackets, so you have hornets or yellowjackets, but not both.
I know Yellowjackets, we have them in Argentina. Their bite is said to be extremely painful but I haven't been bitten yet despite some pretty reckless behavior on my part.
One nice afternoon I was having a snack in a cafeteria, by the open window, and a bunch of yellowjackets started dipping in my drinks and my pie. Apparently they like raw meat (locals use it to drive them away from their own food) but I only had sweet stuff on my table. I got annoyed and killed a bunch of them with my bare hands, with no repercussions (killing dangerous insects with your fists or palms is surprisingly easy if you strike fast against a flat surface -- obviously I waited till they moved away from my stuff).
I was later told this was a terrible idea because their bite is very painful (see above: I'm not the smartest about bugs and have been bitten more than once due to recklessness!).
White-faced hornets[0] are a lot more painful than yellowjackets[1] (they are about twice as big, but pretty much the same configuration).
I don't think yellowjackets will swarm, if a forager gets killed. Don't step on one of their nests, though (they dig holes). Also have a friend who did that, once. Also, if you get close to one of their nests (hard to see), they might swarm you.
The biggest difference, is that yellowjackets are much more aggressive foragers, so it's easy to piss off individuals. I had [yet another] friend that imbibed one that went into his can of soda. He tells me the experience left his lip swollen like a cartoon, for several days.
We have yellow jackets in the SE US. They are as persistent as they are aggressive. The "yellow jacket in the Coke can" is almost a cliche it happens so often. I once ran over a nest with a lawn mower at my family's lake house. I don't specifically remember being suddenly covered in stinging yellow jackets (I was), but I do remember vividly that was the fastest I'd swum across the lake.
where beekeepers use sticky sheets to get one hornet and then all the other hornets will join the one because they are all attracted to its aid by its pheromones.
I had a friend, when I was a kid, that shot a white-faced hornet nest (not actually hornets -they are big yellowjackets -even worse) with a BB gun, from, like, 50 meters away.
The hornets figured out who shot their nest, and swarmed him. May have just been that they attacked any nearby critters, but he certainly paid for his folly.
White-faced hornets are better to have in your yard, than yellowjackets. They are a lot less aggressive, only attacking if their nest is at risk. They also eat yellowjackets, so you have hornets or yellowjackets, but not both.