Vaccines have long been suspected to play a role in the development of autoimmune diseases. The main hypothesis that has been proposed to explain this immunological association is epitope mimicry, just like in infections. According to this mechanism, an antigen that is administered with the vaccine may share structural similarities with self-antigens. The immune response to the vaccine antigen could therefore also extend to other host cells expressing the structurally similar self-antigen. A second mechanism that could be involved is bystander activation. It is an antigen non-specific mechanism that leads to the activation of autoreactive T cells [16]. However, the pathogenetic mechanisms that explain the causal link between vaccinations and autoimmune diseases are not yet fully understood and they are also difficult to study [17].
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8402446/