Long COVID is a post-COVID-19 condition characterized by persistent symptoms that can develop after SARS-CoV-2 infection. Estimating and comparing its prevalence across countries is difficult, hindering the quantitative assessment of massive vaccination campaigns as a preventive measure. By integrating epidemiological, demographic and vaccination data, we first reconcile the estimates of long COVID prevalence in the U.K. and the U.S., and estimate a 7-fold yearly increase in the global median prevalence between 2020 and 2022. Second, we estimate that vaccines against COVID-19 decrease the prevalence of long COVID among U.S. adults by 20.9% (95% CI: -32.0%, -9.9%) and, from the analysis of 158 countries, by -15.7% (95% CI: -18.0%, -13.4%) among all who had COVID-19. Our population-level analysis complements the current knowledge from patients data and highlights how aggregated data from fully operational epidemic surveillance and monitoring can inform about the potential impact of long COVID on national and global public health in the next future.