Heat olive oil in a large pot over medium heat. Add onion and cook until softened, about 5 minutes.
Add garlic and cook for 1 minute more.
Add zucchini and vegetable broth. Bring to a boil, then reduce heat and simmer for 20 minutes, or until zucchini is tender.
Use an immersion blender to blend the soup until smooth. Alternatively, carefully transfer the soup to a regular blender and blend until smooth. Return to pot if needed.
Stir in heavy cream (if using) and season with salt and pepper to taste. Heat through.
Serve hot.
Notes
Garnish with fresh herbs or a dollop of sour cream for extra flavor.