The cell displays the spike protein on its surface, and our immune system recognizes it doesn’t belong there. This triggers our immune system to begin producing antibodies and activating other immune cells to fight off what it thinks is an infection.
At the end of the process, our bodies have learned how to protect us against future infection with the virus that causes COVID-19. The benefit is that we get this protection from a vaccine, without ever having to risk the serious consequences of getting sick with COVID-19. Any temporary discomfort experienced after getting the vaccine is a natural part of the process and an indication that the vaccine is working.