Cut the tofu into bite-sized pieces.
Heat cooking oil in a pan and cook the tofu until golden brown.
Slice onion, carrot, and green onion, then add to the pan and stir-fry together.
Season with soy sauce, sugar, and garlic.
Finish by sprinkling pepper and sesame seeds.