During the SARS-CoV-2 pandemic, novel and traditional vaccine strategies have been deployed globally. We investigated whether antibodies stimulated by mRNA vaccination (BNT162b2), including third-dose boosting, differ from those generated by infection or adenoviral (ChAdOx1-S and Gam-COVID-Vac) or inactivated viral (BBIBP-CorV) vaccines. We analyzed human lymph nodes after infection or mRNA vaccination for correlates of serological differences. Antibody breadth against viral variants is lower after infection compared with all vaccines evaluated but improves over several months. Viral variant infection elicits variant-specific antibodies, but prior mRNA vaccination imprints serological responses toward Wuhan-Hu-1 rather than variant antigens. In contrast to disrupted germinal centers (GCs) in lymph nodes during infection, mRNA vaccination stimulates robust GCs containing vaccine mRNA and spike antigen up to 8 weeks postvaccination in some cases. SARS-CoV-2 antibody specificity, breadth, and maturation are affected by imprinting from exposure history and distinct histological and antigenic contexts in infection compared with vaccination.