Blend the chilies, onion, garlic, sliced lemongrass, galangal, ginger, and 2 tablespoons oil into a fine spice paste.
Heat the remaining oil in a large heavy-based pot over high heat. Brown the beef in batches, then remove it to a plate.
Lower the heat to medium-low. Add the spice paste and cook for 2 to 3 minutes until it darkens and its moisture reduces.
Add the cinnamon, clove, star anise, cardamom, smashed lemongrass, coconut milk, tamarind, lime leaves, coconut, sugar, salt, and beef. Stir to combine.
Bring to a simmer, then reduce the heat so the sauce bubbles very gently. Cover and simmer for 1 hour 15 minutes.
Remove the lid and check the beef. It should be quite tender but not yet falling apart; if already very tender, remove it while reducing the sauce.
Increase the heat to medium and reduce the sauce for 30 to 40 minutes, stirring increasingly often, until it becomes a paste coating the beef.
Cook until the beef is fall-apart tender. Remove from the heat and serve with plain or coconut rice.