The answer is a Phase IV clinical trial, which a number of vaccines have undergone post-approval and I suspect the COVID-19 vaccines will as well.
https://www.npr.org/sections/health-shots/2021/02/19/9691430...
“According to Pfizer-BioNTech and Moderna, interim analyses after approximately 2 months of follow-up suggest their vaccines are 90% to 95% effective at preventing SARS-CoV-2 infection, although no peer review of the data has been conducted to date. Both companies now claim they have an “ethical obligation” to offer vaccine as soon as possible to all participants who received placebo, considering the strong results and participants’ contribution to the research.“
There are somewhat more exotic studies designs that can be used for post-unblinding monitoring work that meet the ethical obligations to the participants.
But it's a good question.