Press the tofu using a tofu press. Alternatively, wrap it in paper towels and place it between two flat surfaces. Add a heavy object to the top. Press for 15 minutes.
While the tofu presses, mix the salt, sugar, pepper, 5-spice powder, and ground ginger in a small bowl.
Cut the tofu into 1-inch cubes or slice it into squares.
Preheat the air fryer to 375 F (190 C). For Baking, set the oven to 425 F (220 C).
Toss the tofu cubes with lemon juice and soy sauce.
Mix half the seasoning mix with 1 tablespoon of cornstarch and toss with the tofu. Cover all sides of the tofu.
Air Fry. Add the tofu in a single layer to the bottom of the air fryer basket. Fry for 10-12 minutes, flipping after 6 minutes.
Bake. Add the tofu in a single layer to a parchment-lined baking sheet. Bake for 15 minutes, flip and bake another 15 minutes.
The tofu is done when it's firm and slightly brown.
While the tofu cooks, heat a small skillet or frying pan. Cook the green onions, chili, and garlic for 1-2 minutes, stirring constantly.
Serve salt and pepper tofu garnished with the green onion mixture and the remaining spice mixture.