Dice the green onion and keep the white part and green part separately.
Mince the garlic and slice the ginger.
Set the Instant Pot to saute mode and add the oil. Add the sliced red onion, white parts of the green onions, whole spices, ginger and garlic. Allow the veggies caramelize a bit.
Now add the water and bouillon paste, soy sauce, rice vinegar, and salt. Set the Instant Pot to pressure cook for 2 minutes.
Wait for five minutes after the beep and release pressure carefully. Discard the cooked veggies using a strainer.
Now add the wontons or dumplings and adjust salt and pepper if necessary.
Now set the instant pot to the soup mode for 3-minutes.
After the natural pressure release, add the chopped green onions, spinach or bokchoy and chili oil.
Serve the Instant Pot wonton soup immediately.