Whether a vaccine can cause illness depends on what's in it.
Inactivated and subunit vaccines
Most vaccines use a killed pathogen or just a part of one. Pneumococcal vaccines, hepatitis B vaccine, the inactivated flu shot and mRNA vaccines contain no live virus or bacteria that can replicate. They can't multiply in the body, so they can't cause the disease.
Live-attenuated vaccines
A few vaccines contain a live pathogen that has been heavily weakened in the lab, such as the MMR vaccine, the chickenpox vaccine and the nasal flu vaccine. The weakened virus is enough to train the immune system but generally not enough to cause illness. A small number of people may get a mild rash or low fever one to two weeks after MMR; that's an immune response, not actual measles.
Common reactions after a vaccine
Soreness, redness or swelling at the injection site, low fever, headache or tiredness are common in the first day or two and usually settle within a few days. These are signs the body is building protection, not signs you've caught the disease.
Who needs extra care
People with a seriously weakened immune system may not be suitable for live-attenuated vaccines and should check with a doctor first. For them, doctors usually choose an inactivated or subunit vaccine.