Press the tofu by wrapping it in a clean kitchen towel and placing a heavy object on top for about 15-20 minutes. Cut into bite-sized cubes.
Heat the toasted sesame oil in a non-stick skillet over medium heat until it shimmers.
Add the cubed tofu in a single layer and cook undisturbed for about 5-7 minutes until golden brown. Flip and brown all sides, about 10-12 minutes total.
Reduce heat to low, add minced garlic and ginger (if using), and sauté for about 1 minute until fragrant.
Pour in the hoisin sauce and tamari, stir gently to coat, and let it simmer for an additional 2-3 minutes.
Slice the green onions and sprinkle over the tofu. Serve hot over rice or noodles.