Place the dried rice noodles in a large bowl, cover with warm water, and soak until the noodles are pliable and opaque, 30 to 45 minutes. Drain the noodles and rinse them to remove excess starch. (Alternatively, cook the noodles according to the instructions on the package.)
Meanwhile, prepare the broth: Select the Sauté setting on the Instant Pot and, after a few minutes, add the oil. Once the display reads “HOT,” add the onions and ginger slices, cut side down. Do not toss and allow to cook until charred and deeply browned, about 4 minutes .
Add the whole spices (cardamom pods through black peppercorns) and cook for 1 minute , stirring the mixture frequently. Add the apple, cilantro, tamari, coconut sugar, and shiitakes. Pour the vegetable broth and/or water on top and stir to combine. Select the Cancel setting.
Secure the lid and set the Pressure Release to Sealing . Select the Pressure Cook setting at high pressure and set the cook time to 15 minutes .
Once the 15- minute timer has completed and beeps, allow a natural pressure release for 10 minutes and then switch the Pressure Release knob from Sealing to Venting to release any remaining steam.
Open the pot and, using oven mitts, remove the inner pot. Carefully strain the broth into a ﬁne- mesh sieve set over a large bowl (discard the solids). Season the broth with 1 teaspoon salt, stir, and taste. Add more salt as needed. Select the Cancel setting.
Place the cooked rice noodles in individual bowls. Pour over the strained broth and add the baked tofu cubes. Top the pho with the scallions, basil, cilantro, lime wedges, bean sprouts, and chiles or Sriracha.