mRNA vaccines work by instructing cells in the body to produce a protein that triggers an immune response. For instance, the mRNA in the COVID-19 vaccine encodes the spike protein found on the surface of the SARS-CoV-2 virus. Once the protein is made, the immune system recognizes it as foreign and mounts an immune response. This prepares the body to fight the actual virus if it is encountered in the future.