Wash the zucchini and cut off the ends. Chop them into small pieces.
Peel and chop the onion and garlic cloves.
In a large pot, heat olive oil over medium heat. Add chopped onion and sauté for about 5 minutes until translucent.
Add minced garlic and cook for another minute, stirring to prevent burning.
Add chopped zucchini to the pot and mix well. Cook for about 5 minutes until zucchini starts to soften.
Pour in vegetable broth and add dried thyme, salt, and black pepper. Bring the mixture to a boil, then reduce heat to low and let it simmer for 15 minutes.
Once the zucchini is tender, remove the pot from heat. Blend the soup until smooth and creamy using a blender or immersion blender.
If using, stir in heavy cream to add richness and return to low heat to warm through.
Taste and adjust seasoning if needed.
Serve hot, garnished with fresh basil.