Set the oven to 450°F (no need to preheat). Spray a baking sheet with oil and add the onions and ginger. Spread out into a single layer. Place the sheet tray in the oven and bake until slightly charred.
Add beef shanks to the Instant Pot with 6 cups of water (enough to cover them). Then, using the high sauté setting, bring it up to a boil. Remove the shanks and set aside once the water reaches a rolling boil. Discard water and wash all scum from the bottom of the pot.
Add the star anise, coriander seeds, fennel seeds, cloves, and cinnamon stick to the pot and toast them on the high sauté setting until fragrant (about 3 minutes).
Return beef shanks to the pot along with charred ginger and onions, fish sauce, sugar, spices, salt, and 10 cups of water. Cook at high pressure for 30 minutes. Allow pressure to release naturally for at least 30 minutes (longer is better).
Pour the broth through a fine mesh strainer. You can eat the beef shank, but we won’t use it anymore for this recipe. Return broth to heat and bring it back to a boil. You can do this in the pot using the sauté setting or on the stovetop.