Heat 1 tablespoon vegetable oil in a large wok over medium heat. Add star anise, garlic, ginger, and red pepper flakes; stir-fry until garlic and ginger are just golden, 1 to 2 minutes. Using a slotted spoon, transfer garlic mixture to a small bowl; set aside.

Increase heat to medium-high and heat remaining oil in wok. Add pork and stir-fry until golden brown all over, 4 to 5 minutes. Return garlic mixture to wok; add soy sauce and toss well. Transfer contents of wok to a large bowl; cover and keep warm.