With your instant pot on sauté function, heat 2 tbsp of olive oil.
Add the onion and cook it until the onion is transparent, approx 3 mins.
Add the garlic and saute until golden, about 2 minutes.
Add the ginger, the cayenne, and the nutmeg and stir.
Turn off the instant pot, and add the sweet potatoes and stir.
Then, add the pumpkins, and stir.
Add the liquid and then the cinnamon, the cloves and the star anis (try to keep the whole spices on top so they are easier to scoop out before blending - alternatively, you can just make a little pouch with a cheese cloth with the spices inside, then just remove the little pouch all at once).
Close the instant pot, and set to 25 minutes on manual.
After 25 minutes, release the pressure manually, and carefully open the pot when you are able.
Remove the spices and discard them.
Using an immersion blender, blend the soup until smooth.
Season with salt and pepper.
Serve and garnish with coconut milk, olive oil, pumpkin seeds and dried cranberries of top.