If you find gray earwax on a cotton swab, there are two possible explanations.
It could be due to ambient dust caused by pollution, especially in large cities, or it could be related to your genetics.
Indeed, according to the Hearing Guide by Bruno Frachet and Émilie Vormés, earwax is genetically determined.
For example, Asians and Native Americans have dry, gray earwax, while Caucasians and Africans have moist, honey-brown earwax.