There is a race because the more people that are infected with the current strains, the more chances that the virus will have to evolve into newer strains.
It is also believed that new strains are more likely to appear in places where the pandemic is out of control, with a large number of people currently infected and also a large number of people that already have some immunity to previous versions of the disease. This provides the selective pressure that can lead to new variants arising. Therefore, getting the pandemic under control using vaccinations and other measures is key to reducing the number of new variants that pop up.