In a blender or food processor, combine the chopped onion, garlic, ginger, and galangal. Blend until smooth.
Heat vegetable oil in a large pot or Dutch oven over medium heat.
Add the spice paste and cook, stirring frequently, until fragrant and the oil starts to separate, about 5 minutes.
Add the beef cubes to the pot and brown on all sides.
Stir in the turmeric, cumin, coriander, black pepper, and salt.
Add the coconut milk, beef broth, tamarind paste, palm sugar, lemongrass, and kaffir lime leaves.
Bring to a boil, then reduce heat to low.
Simmer uncovered, stirring occasionally, until the beef is tender and the sauce has thickened, about 1.5 to 2 hours.
Adjust seasoning with salt and sugar if necessary.
Garnish with toasted coconut and fresh cilantro if desired.
Enjoy your meal!