Wrap the tofu in an absorbent towel and set something heavy on top, to press out extra moisture for 5 minutes.
Chop the tofu into small vertical cubes that make for easy cooking.
Place the uncooked spaghetti into the Instant pot along with the spinach, and add water until the pasta is covered.
Add the garlic powder, salt and pepper to Instant pot.
Close the Instant pot and cook at Manual high pressure for 2 minutes. (If using whole wheat pasta, add one more minute to the Instant pot cooking time.)
In a separate pan, heat the olive oil and sauté the tofu for 5 minutes, flipping occasionally to cook on all sides.
After the Instant Pot timer ends, quick release the steam.
Open the instant pot and add the tofu, fresh spinach, and cream (and optional parmesan) into the mix.
Press the sauté button on the Instant pot with the tofu and pasta for 2 minutes to let it blend completely into the spaghetti.
Serve while warm.
Notes
If the pasta is too watery after cooking, let it rest for 10-15 minutes for the water to reduce.