Heat olive oil in a large pot over medium heat. Add the chopped onion and garlic, cooking until translucent, about 5 minutes.
Add the cubed butternut squash, vegetable broth, salt, pepper, and nutmeg. Bring to a boil, then reduce to a simmer. Cover and cook until the squash is tender, about 20-25 minutes.
Using an immersion blender, puree the soup until smooth. Alternatively, you can carefully transfer the soup in batches to a blender or food processor.
Adjust seasoning with additional salt and pepper if needed. Stir in heavy cream if using. Serve hot.