If you're going to bake it, preheat the oven to 400ºF or 200ºC and bake it for about 15 minutes on one side and for another 5 minutes on the other side. Cook longer if needed until golden brown.
If you're going to sautée the tofu, heat some oil in a skillet, and when it's hot, add the tofu and cook over medium-high heat for both sides until golden brown.
Mix the sugar, soy sauce, gochujang, and vegetable stock or water in a bowl until well combined. Set aside.
Heat the 1 tablespoon oil in a skillet and cook the garlic and onion over medium-high heat until golden brown, stirring frequently.
Incorporate the cooked tofu and the sauce, stir, and cook for about 5 minutes.
Serve your spicy tofu immediately or store the leftovers in an airtight container in the fridge for up to 1 week. It can be reheated in the microwave or on the stovetop over medium heat until warmed through. Add a little water or vegetable stock if needed.
Notes
You can find gochujang (Korean hot pepper paste) at many Asian markets, but if you don't have one close by, you'll be able to easily get it through this affiliate link. Another option would be to use tomato paste with some cayenne powder or Sriracha to make the tomato paste spicy instead of the gochujang.
Feel free to use other types of sugar, like granulated, coconut, or cane sugar. Make sure the sugar you’re using is vegan.