The mRNA molecules in the vaccine just contain the instructions for the spike protein. https://berthub.eu/articles/posts/reverse-engineering-source... has a good breakdown of what specificly it makes.
To use an analogy to a computer - DNA is like the hard drive (long term storage but slow), RNA is like RAM (short term, degrades easily, but easy to transport and gets info where it needs to go), ribosomes are like the CPU (executes the code in the RNA, outputs a protein). Normally, DNA gets copied into RNA, which instructs the ribosome what protein to make. The vaccine is like inserting a fake message. The ribosomes see RNA and follow the instructions, but the RNA came from the vaccine instead of the cell's DNA. This is one of the reasons why the vaccine is so safe, because RNA just naturally breaks down very quickly in the body.
Booster generally causes more side effects, because the body has seen the spike protein before (from the first vaccine) so it recognizes it faster and mobilizes a more robust response. In a certain sense, its already done a practise run, so the body kicks things into high gear right away.
[IANAD]