Hi, from your picture, your thyme could possibly have the following problems:
1. the soil is too wet.
2. Poor ventilation which can be caused by the surrounding environment or by the fact that the thyme is too crowded.
Solution to 1: water the plant only when the surface soil is dry
Solution to 2: Make sure that the location has good sunlight and ventilation. Harvest 1/4 of the leaves from the top to ensure good ventilation. From your picture, it seems that you need to harvest some of the top leaves so that the thyme can "breathe"
Also, as other buddies have said, you may need to move the thyme to a large pot so that the plant is covered with enough soil.