Immune cells present in a mother's breast milk enter the infant's thymus & form part of the baby's immune system.

ucrtoday.ucr.edu

The research, which used mice, showed that vaccinating the mother resulted in vaccination of the baby through this process of transferring maternal immune cells which then guide the infant’s immune cells to attack the same infectious organisms to which the mother has been exposed.