You put in a bit of mRNA that turns into spike protein in the cell. The cell HLA recognises a bit of peptide, presents it to the TCR. You now have T cells that recognise that spike antigen and react faster. It gives you a chance of avoiding infection and serious illness. I just don’t get the bit where this could be bad.
I suppose if you get a massive dose of a mRNA and you’ve a tendency to have an adverse reaction to the spike protein, you could get ill from it but you’d have gotten ill from being infected with the real deal as well.