Heat olive oil in a large pot over medium heat. Add chopped onion and cook for 7-8 minutes, stirring occasionally, until golden and caramelized.
Add minced garlic and cook for 1 minute until fragrant, stirring to prevent sticking.
Add chopped courgettes, vegetable broth, thyme, salt, and pepper. Bring to a boil.
Reduce heat to medium-low and simmer for 15 minutes until courgettes are very tender and easily pierced with a fork.
Remove from heat and use an immersion blender to puree the soup until completely smooth. Alternatively, carefully transfer to a blender in batches.
Stir in cream cheese and lemon juice until fully incorporated and creamy.
Serve hot, garnished with fresh basil leaves.