In a large soup pot, heat the butter or olive oil over medium heat. Add the chopped onions and garlic, and sauté for about 5 minutes until the onions are soft and translucent.
Add the canned pumpkin puree to the pot and continue to cook, stirring, for another 2-3 minutes.
Pour in the vegetable or chicken broth and stir well to combine with the pumpkin puree.
Bring the mixture to a boil, then reduce the heat to a simmer. Cover the pot and let it cook for about 10-15 minutes to allow the flavors to meld together.
Stir in the coconut milk or heavy cream to make the soup rich and creamy. Adjust the amount to achieve your desired consistency.
Season the soup with ground cinnamon, ground nutmeg, salt, and pepper. Start with a little seasoning and add more as needed, tasting as you go.
Let the soup simmer for an additional 5-10 minutes to fully incorporate the flavors.
Serve hot, garnished with your choice of toppings such as roasted pumpkin seeds, a drizzle of cream, chopped fresh herbs, or croutons.