The stinger of a bee is barbed, like a fishing hook. When they sting you, the stinger gets stuck in your skin. When the bee flies away, the stinger, often along with some of the bee's innards, stays behind. Having those bits ripped out of its body is what kills the bee.
Wasp stingers, in contrast, are not barbed. The same wasp can sting you multiple times, even after the wasp runs out of venom, and it can continue living quite happily.