Roast the Pumpkin: Preheat your oven to 400°F (200°C). Carefully cut the pumpkin in half and scoop out the seeds. Brush the inside with olive oil and place the halves cut-side down on a baking sheet. Roast for 30-40 minutes, or until the pumpkin is fork-tender.
Sauté Aromatics: While the pumpkin is roasting, melt butter (or oil) in a large pot over medium heat. Add the chopped onion and cook until soft and translucent, about 5-7 minutes. Add the minced garlic and cook for one more minute until fragrant.
Simmer the Soup: Once the pumpkin is roasted, let it cool slightly and then scoop the flesh out of the skin. Add the pumpkin flesh to the pot with the onions and garlic. Pour in the vegetable broth, add the thyme sprig, salt, pepper, and nutmeg. Bring to a boil, then reduce heat and let it simmer for 15 minutes.
Blend Until Smooth: Remove the thyme sprig. Use an immersion blender to blend the soup directly in the pot until it's completely smooth and velvety. Alternatively, carefully transfer the soup in batches to a regular blender and blend until smooth.
Finish with Cream: Return the blended soup to the pot over low heat. Stir in the heavy cream (or coconut milk) and warm through gently. Do not let it boil. Taste and adjust seasoning if needed. Serve hot.