Moderna/Pfizer/BioNTech

How does the Moderna and Pfizer/BioNTech vaccine work?