A lot of people have this mistaken idea that a vaccine is supposed to be completely harmless to you but gives you the immunity boost against the infection.
That's not the case. There's always been a chance that you would have adverse reactions to the vaccine. This has been true for vaccines up to and including today.
But let me give you a classic example; the original smallpox vaccines. For the first and second generation of the vaccine, there was a chance that it could kill the person receiving it- whether through an allergic reaction or by overwhelming your immune system and actually giving you the disease.
There was also a chance you would just die. But wait! There's more! The scab from the injection site was capable of killing SOMEONE ELSE.
Yeah, the first 2 versions of the small pox vaccine, which was used up into 2017, was capable of killing the vaccinated and someone else.
So, you should discard this idea that a vaccine must be 100% perfectly safe for everyone, because no vaccine is 100% perfectly safe for everyone. There's always a risk. But that risk is so much lower than the risk of getting and dying from the disease.