Place water in a small saucepan and add all the whole spices: cloves, star anise, cinnamon sticks, and peppercorns.
Bring the mixture to a gentle simmer over medium heat, allowing the spices to infuse the water with their aromatic oils.
Reduce the heat to low and let it simmer uncovered for about 15 minutes, until the liquid develops a fragrant aroma and slightly darkens.
Turn off the heat and carefully remove the spices with a slotted spoon, letting any excess liquid drip back into the pan.
Pour the strained spice infusion into a jar or container, allowing it to cool slightly before using.
Store the spice mixture in a sealed jar at room temperature; use it to enhance soups, stews, or roasted vegetables for a warm, cozy flavor.