Clumping may happen because of moisture, so it's best to store vanilla sugar in an airtight container in a cool, dry place. You can add a small amount of rice to the container to absorb excess moisture if needed. Otherwise, gently shaking the jar every few weeks also helps prevent clumping.