Heat oil in a medium pot over medium heat. Add onion, cut side down, garlic, and ginger. Cook, stirring occasionally, until garlic is golden, 3–4 minutes. Add 1 1/2 cups water, broth, star anise, and cinnamon; bring to a boil. Reduce heat; simmer until flavors meld, 7–8 minutes. Add mushrooms; simmer 2 minutes. Add scallion. Season with salt.
Meanwhile, boil ramen until tender but still firm to bite. Drain; divide among bowls.
Add beef slices to soup; simmer until just cooked through, about 20 seconds. Using tongs, transfer beef to bowls.
Discard ginger, garlic, star anise, and cinnamon; ladle broth into bowls. Garnish with bean sprouts, basil, and sliced chiles.
Recipe by The Bon Appétit Test Kitchen