Prepare the vegetables: Peel and finely chop the onion and garlic. Let the frozen leaf spinach thaw slightly, squeeze out the excess liquid, and roughly chop it. Alternatively, wash and roughly chop the fresh spinach.
Sauté the onion and garlic: Heat the olive oil in a large pan. Sauté the onion until translucent, then add the garlic and cook for another 30 seconds.
Cook the spinach: Add the thawed frozen spinach to the onion and garlic and sauté for about 2 minutes. Alternatively, add the fresh spinach in batches and cook until wilted, stirring occasionally.
Season: Add the salt, black pepper, and freshly grated nutmeg. Mix well and cook for another two minutes.
Finish the filling: Remove the pan from the heat. Stir in the vegan yogurt, nutritional yeast, lemon juice, lemon zest, and all the herbs. Crumble the tofu into small pieces directly over the pan using your hands, then stir it into the filling.
Check the moisture: If the filling contains too much liquid, thicken it with a little flour if needed. Simply push the filling to one side and stir the flour into the excess liquid.
Let it cool: Allow the filling to cool before assembling the spanakopita.