The Pfizer and Moderna vaccines are mRNA vaccines. These vaccines teach your body to make a piece of a protein from the COVID-19 virus using instructions from the virus, called mRNA.
The instructions tell cells in your body how to make part of a harmless protein from the virus. Once the cells make the protein, the instructions are broken down.
The cells display the pieces of protein they’ve created on the outside of your cell and your body recognizes that protein as foreign and develops an immune response. This response will recognize and fight the virus that causes COVID-19 if you are exposed later on.
mRNA vaccines do not change or affect your own DNA.