Preheat oven to 400°F (200°C).
Toss squash cubes with olive oil on a baking tray.
Roast for 25–30 minutes until tender and slightly caramelized.
Heat a large pot over medium heat.
Add chopped onion and sauté until soft.
Stir in minced garlic and cook briefly.
Add roasted squash to the pot.
Pour in vegetable broth.
Sprinkle cinnamon and nutmeg if using.
Simmer for 10–15 minutes.
Allow the soup to cool slightly before blending, or use an immersion blender directly in the pot.
Blend until smooth and creamy.
Season with salt and pepper and serve warm.