Place oxtail and beef bones into a large pot (or in 2 separate pots), then fill with enough water to cover the beef. Bring to a boil over high heat, then discard the gunky water. Rinse the oxtail and beef bones until clean. Drain and set aside.
Turn on the sauté function of the Instant Pot. When the "hot" indicator is on, add the halved onions and smashed ginger. Allow the onions and ginger to char and flip to ensure this is done on both sides. No oil is needed.
When both sides of the onions and ginger have been charred, add the oxtail and sear until slightly browned (optional).
While the onions are charring and/or oxtail or searing, toast the spices by placing a dry pan on medium heat. In one layer, add all the spices to the pan, shaking or stirring to ensure even toasting, then remove when you can smell the aroma of the spices. Place them into a tea bag and tie tightly (see notes below for product links).
Add 8 cups of water into the Instant Pot, followed by the spice bag, apple, 1 tbsp sugar and 3 tbsp fish sauce (or to taste).
Pressure cook on high for 40 minutes with the steam valve in sealing position.
When time is up, allow the pressure to naturally release completely. Remove fat and residual scum from the beef broth with a fat skimmer (optional) and discard the spice bag. You may also let the broth cool down, refrigerate it, then remove coagulated fat before reheating the soup the next day.
To serve, boil pho noodles according to package instructions. place a serving into a bowl, then add the oxtail broth, along with other toppings and condiments of choice. Enjoy!