A (n) _______________ is an injection of weakened or dead viruses or bacteria, or pieces of proteins from weakened or dead viruses or bacteria. It is given to help the immune system of people "learn" how to defeat the real virus or bacteria.
vaccine
The wording given is pretty much the exact definition of a vaccine. The key to how a vaccine works is that it provides to the immune system, samples of the surface proteins of the infectious materials. With those samples available, the immune system is able to produce antibodies that react to those proteins.