Communities worldwide have used vaccines and facemasks to mitigate the COVID-19 pandemic. When an individual opts to vaccinate or wear a mask, they may lower their own risk of becoming infected as well as the risk that they pose to others while infected. The first benefit–reducing susceptibility–has been established across multiple studies, while the second–reducing infectivity–is less well understood. Using a new statistical method, we estimate the efficacy of vaccines and facemasks at reducing both types of risks from contact tracing data collected in an urban setting. We find that vaccination reduced the risk of onward transmission by 40.7% [95% CI 25.8–53.2%] during the Delta wave and 31.0% [95% CI 19.4–40.9%] during the Omicron wave and that mask wearing reduced the risk of infection by 64.2% [95% CI 5.8–77.3%] during the Omicron wave. By harnessing commonly-collected contact tracing data, the approach can broadly provide timely and actionable estimates of intervention efficacy against a rapidly evolving pathogen.