Make the garlic oil. Heat the oil in a small pan over medium heat, fry the minced garlic until just golden (about 2 minutes), and transfer to a heatproof bowl. Set aside — this gets drizzled over each bowl at the end.
Build the broth. Bring the water to a simmer in a large pot. Stir in the tamarind (dissolved first in a ladle of hot water so it disperses evenly), the sugar, and the fish sauce. Taste now, before anything else goes in: it should be clearly sour with sweetness and salt behind it. Adjust tamarind and sugar in small increments — the safe approach is to start at 1 tbsp tamarind and taste up, since overshooting makes the soup harsh.
Cook the firm vegetables. Add the pineapple and okra; simmer 2 minutes. Add the celery and tomato wedges; simmer 2 minutes more.
Add the shrimp last. Bring the soup back to a boil, add the shrimp, and cook just until they turn pink and opaque — about 2 minutes. Do not walk away; shrimp go from perfect to rubbery in under a minute past done. The shrimp must be fully opaque all the way through (145°F / 63°C) — no translucent centers.
Finish. Remove from heat immediately. Stir in half the herbs. Place a handful of raw bean sprouts in each serving bowl and ladle the hot soup over them — the residual heat wilts them just enough. That is the intended texture, not an oversight.
Serve hot over or alongside steamed rice, topped with the remaining herbs and a drizzle of garlic oil.