Combine the sugar, water, cinnamon stick, and star anise in a small saucepan. Bring to a simmer over medium heat and let it cook for 5 minutes. Let steep until it completely cools down, then strain. (You may store it in a closed container in the fridge.)