Heat the olive oil in a large pot over medium heat. Add the onion and cook until it softens, about 5 minutes. Stir in the garlic and cook for 1 minute more.
Add the cubed butternut squash and chopped apples to the pot. Stir to coat them with the onion mixture.
Pour in the vegetable broth. Add the cinnamon and nutmeg. Bring the mixture to a boil, then reduce to a simmer. Cook until the squash is tender, about 20 minutes.
Remove the pot from the heat. Use an immersion blender to puree the soup until smooth. If using a countertop blender, work in batches and return the soup to the pot.
Stir in the coconut milk. Season with salt and black pepper. Warm the soup gently over low heat for a few minutes before serving.