Remove any woody stems from the thyme - you can use the rest as shorter stems or just leaves, as you prefer.
Add the sugar, water and thyme to a small pan and warm over a medium heat, stirring regularly to help the sugar dissolve. Only warm it enough to let the sugar dissolve and have the mixture just starting to simmer.
Remove the pan from the heat and allow the thyme to steep in the syrup for around 15-20 minutes as the syrup cools.
Pour the syrup through a fine strainer/sieve to hold back the thyme and store the syrup in a sealed bottle/jar in the fridge until needed.
Notes
I used regular sugar in the US, which is relatively fine - I'd recommend you don't use a coarse sugar to help it dissolve quicker and certainly not so that it still needs to dissolve before reaching a simmer.