system
Given the following post, respond as if you're commenting on Reddit:
human
Could an identical twin who recovered from an infection donate some of their T-cells to the other twin as a form of vaccine?

Could this work with any two people? I assume it would work best with identical twins since their lymphocytes would be genetically identical.
gpt
Theoretically, yes, although immunity is a bit more complicated than T-cells.

Something related called donor lymphocyte infusion is performed. It happens when someone who received a stem cell transplant  has disease relapse. You take the T-cells from the donor (who has the "same" immune system) and inject them into the recipient, hoping that will give sufficient immunologic boost to kill the cancer.

If you transfuse someone's T-cells into an unrelated person, the T-cells will attack the other person's body and result in something called graft versus host disease. It's a terrible disease.

There's also granulocyte transfusion, where you take someone's neutrophils and transfuse into someone who has too few neutrophils which can theoretically help fight an infection. Neutrophils can't cause graft versus host disease because they die off quite quickly and can't divide. The evidence that it works is quite questionable though.