ObjectivesTo evaluate the effectiveness of COVID-19 vaccinations (initial and booster) during pre-Delta, Delta and Omicron dominant periods among pregnant people via (1) COVID-19 incident and severe infections among pregnant people who were vaccinated versus unvaccinated and (2) post-COVID-19 vaccination breakthrough infections and severe infections among vaccinated females who were pregnant versus non-pregnant.DesignRetrospective cohort study using nationally sampled electronic health records data from the National COVID Cohort Collaborative, 10 December 2020 –7 June 2022.ParticipantsCohort 1 included pregnant people (15–55 years) and cohort 2 included vaccinated females of reproductive age (15–55 years).Exposures(1) COVID-19 vaccination and (2) pregnancy.Main outcome measuresAdjusted HRs (aHRs) for COVID-19 incident or breakthrough infections and severe infections (ie, COVID-19 infections with related hospitalisations).ResultsIn cohort 1, 301 107 pregnant people were included. Compared with unvaccinated pregnant people, the aHRs for pregnant people with initial vaccinations during pregnancy of incident COVID-19 were 0.77 (95% CI 0.62 to 0.96) and 0.88 (95% CI 0.73 to 1.07) and aHRs of severe COVID-19 infections were 0.65 (95% CI 0.47 to 0.90) and 0.79 (95% CI 0.51 to 1.21) during the Delta and Omicron periods, respectively. Compared with pregnant people with full initial vaccinations, the aHR of incident COVID-19 for pregnant people with booster vaccinations was 0.64 (95% CI 0.58 to 0.71) during the Omicron period. In cohort 2, 934 337 vaccinated people were included. Compared with vaccinated non-pregnant females, the aHRs of severe COVID-19 infections for people with initial vaccinations during pregnancy was 2.71 (95% CI 1.31 to 5.60) during the Omicron periods.ConclusionsPregnant people with initial and booster vaccinations during pregnancy had a lower risk of incident and severe COVID-19 infections compared with unvaccinated pregnant people across the pandemic stages. However, vaccinated pregnant people still had a higher risk of severe infections compared with non-pregnant females.