Cut the tofu into bite-sized pieces.
Slice the onion and green onion.
Heat cooking oil in a pan and fry the tofu until golden brown.
Push the tofu to one side and sauté the onion and green onion.
Add soy sauce, minced garlic, red pepper flakes, and sugar, then stir-fry evenly.
Once everything is well mixed, transfer to a plate.