The evolution of pathogens has received attention in a wide range of scientific fields, such as epidemiology, demography, and evolutionary ecology. Understanding pathogen evolution is particularly urgent for rapidly evolving pathogens, such as SARS-CoV-2, which has spread globally since 2019.