Quoting from the US Centers for Disease Control and Prevention page Misconceptions about Seasonal Flu and Flu Vaccines:
Can a flu shot give you the flu?
No, a flu shot cannot cause flu illness. Flu vaccines given with a needle are currently made in two ways: the vaccine is made either with a) flu vaccine viruses that have been ‘inactivated’ and are therefore not infectious, or b) with no flu vaccine viruses at all (which is the case for recombinant influenza vaccine). The most common side effects from the influenza shot are soreness, redness, tenderness or swelling where the shot was given. Low-grade fever, headache and muscle aches also may occur.
Some people do get a seasonal flu vaccine and still get sick with flu-like symptoms. The same page explains this:
There are several reasons why someone might get flu symptoms even after they have been vaccinated against flu.
- One reason is that some people can become ill from other respiratory viruses besides flu such as rhinoviruses, which are associated with the common cold, cause symptoms similar to flu, and also spread and cause illness during the flu season. The flu vaccine only protects against influenza, not other illnesses.
- Another explanation is that it is possible to be exposed to influenza viruses, which cause the flu, shortly before getting vaccinated or during the two-week period after vaccination that it takes the body to develop immune protection. This exposure may result in a person becoming ill with flu before protection from the vaccine takes effect.
- A third reason why some people may experience flu like symptoms despite getting vaccinated is that they may have been exposed to a flu virus that is very different from the viruses the vaccine is designed to protect against. The ability of a flu vaccine to protect a person depends largely on the similarity or “match” between the viruses selected to make the vaccine and those spreading and causing illness. There are many different flu viruses that spread and cause illness among people. For more information, see Influenza (Flu) Viruses.
- The final explanation for experiencing flu symptoms after vaccination is that the flu vaccine can vary in how well it works and some people who get vaccinated may still get sick.