Drain the tofu and press out excess moisture. Cut it into small cubes.
Heat vegetable oil in a pan over medium heat. Add the tofu cubes and cook until they are golden brown and crispy on all sides. Remove tofu from the pan and set aside.
In the same pan, add a little more oil if needed. Sauté the chopped onion until it becomes translucent.
Add the minced garlic and ginger, and cook for another 1-2 minutes until fragrant.
Stir in the diced tomato and cook until it softens.
Add the soy sauce, fish sauce, turmeric powder, ground cumin, and ground coriander. Stir well to combine.
Pour in the vegetable broth (or water) and coconut milk. If using tamarind paste, add it now. Bring the mixture to a simmer.
Return the browned tofu to the pan. Stir gently to coat the tofu with the sauce. Simmer for about 5-10 minutes, allowing the flavors to meld together.
Adjust seasoning with salt and pepper to taste. Add sliced green chilies if desired.
Garnish with chopped fresh cilantro.
Enjoy your meal!