In a medium saucepan, combine water, sugar, cinnamon sticks, cloves, cardamom pods, star anise, ground ginger, nutmeg, and black pepper.
Bring the mixture to a boil over medium-high heat, then reduce the heat to low and simmer for 10 minutes to allow the spices to infuse.
Add the black tea bags to the saucepan and simmer for another 5 minutes, ensuring the tea steeps fully.
Remove the saucepan from heat and stir in the vanilla extract.
Strain the syrup through a fine-mesh sieve or cheesecloth into a clean jar or bottle to remove the spices and tea bags.
Let the syrup cool completely before sealing the jar or bottle. Store in the refrigerator for up to 2 weeks.
To use, mix 2-3 tablespoons of chai syrup with steamed milk (dairy or plant-based) for a chai latte, or stir it into coffee for a chai-flavored coffee. Adjust sweetness to taste.
Notes
For a stronger flavor, increase the steeping time for the tea bags. Adjust the spice quantities to suit your taste preferences.