Cut the tofu into bite-sized cubes.
Slice the onion and carrot thinly.
Add cooking oil to a pan and pan-fry the tofu until golden.
Push the tofu aside and sauté the vegetables.
Add soy sauce, minced garlic, and pepper, then stir-fry everything to combine.
Place the cooked tofu and vegetables on top of rice to serve.