By injecting dead cells of the disease into the body, the body can analysis what it is supposed to be fighting off before it gets the active diseases. So if the body does actually get the disease then it knows how to fight it off and can have a better chance at doing it.
MRNA (messenger RNA) carries genetic information copied from the DNA in a series of three-based codes which specifies an amino acid
:))