mRNA vaccines instruct cells to produce spike protein that will trigger an immune response. But which types of cells will it work on? and which cells will it not work on?
I’m assuming the question refers to the Pfizer/BioNTech and Moderna vaccines in which Lipid NanoParticles (LNP) are used and to the injection to be intramuscular (i.m.). According to a blog by Derek Lowe , the parts of your body producing the coronavirus Sprike protein antigen are:
the muscle tissue at the site of injection, the lymphatic tissue downstream in your armpit on that side, your spleen, and (for the first day or two) your liver.
In other words, it is not only your muscle cells that become the antigen factory.
 Lowe, Derek (2021) “mRNA Vaccines: What happens”, Science Translational Medicine, AAAS, https://blogs.sciencemag.org/pipeline/archives/2021/01/21/mrna-vaccines-what-happens .
According to this paper written by Emily Bettini and Michela Locci, mRNA-LNPs and locally produced antigens are taken up by dendritic cells via endocytosis . Within the cell, mRNA is translated into the antigenic protein. These locally produced antigens are either degraded by proteasome in the cytoplasm or secreted from the host cell, leading to 2 different immune response activation pathways .
When antigenic proteins undergone degradation by proteasome, the generated antigenic peptide epitopes are loaded onto MHC class I molecules within the endoplasm reticulum, then transported to and expressed at the plasma membrane . When dendritic cells transfer to the lymph nodes, these loaded MHC class I peptide epitope complexes are recognized by CD8+ T cells. This pathway induces the formation of cytotoxic T cells which are capable of directly killing the infected cells .
Figure 1. Immune responses elicited by SARS-CoV-2 mRNA vaccines 
When antigenic proteins are secreted from the host cell, they are recognized and taken up by dendritic cells again. They are then degraded in endosome, loaded onto MHC class II molecules, followed by expression at the cell surface . At the lymph nodes, these loaded MHC class II peptide epitope complexes are recognized by CD4+ T cells. This pathway induces the formation of memory B cells (MBCs) and the antibody-secreting long-lived plasma cells (LLPCs) .
1)Bettini E, Locci M. SARS-CoV-2 mRNA Vaccines: Immunological Mechanism and Beyond. Vaccines (Basel). 2021;9(2):147. Published 2021 Feb 12. doi:10.3390/vaccines9020147
2)Wadhwa A, Aljabbari A, Lokras A, Foged C, Thakur A. Opportunities and Challenges in the Delivery of mRNA-Based Vaccines. Pharmaceutics. 2020; 12(2):102. https://doi.org/10.3390/pharmaceutics12020102