Although pivotal trials with varying populations and study methods suggest higher efficacy for mRNA than adenoviral Covid-19 vaccines, not many studies have directly compared vaccine effectiveness in the population. Here, we conduct a head-to-head comparison of BNT162b2 versus ChAdOx1 against Covid-19. We analyse 235,181 UK Biobank participants aged 50 years or older and vaccinated with one or two doses of BNT162b2 or ChAdOx1. People are followed from the vaccination date until 18/10/2021. Inverse probability weighting is used to minimise confounding and the Cox models to derive hazard ratio. We find that, compared with one dose of ChAdOx1, vaccination with BNT162b2 is associated with a 28% (95% CI, 12-42) decreased risk of SARS-CoV-2 infection. Also, two doses of BNT162b2 vs ChAdOx1 confers 30% (95% CI, 25-35) and 29% (95% CI, 10-45) lower risks of both infection and hospitalisation during the study period when the Delta variant is dominant. Furthermore, the comparative protection against the infection persists for at least six months among the fully vaccinated, suggesting no differential waning between the two vaccines. These findings can inform evidence-based Covid-19 vaccination campaigns and booster strategies.