
Preheat the oven to 400 degrees Fahrenheit and line a large, rimmed baking sheet with parchment paper to prevent the paneer from sticking. If you’re using frozen spinach, thaw it in the microwave in a microwave-safe glass dish, about 5 minutes on high—do not drain off the excess water.
Meanwhile, in a food processor, pulse the garlic and ginger together until they’re finely chopped, pausing to scrape down the sides if necessary. Add the chili pepper and onion and pulse until they are finely chopped (be sure to stop before they turn to mush). Transfer the mixture to a bowl and return the food processor bowl to the machine (no need to rinse it).
In the food processor, process several handfuls of the fresh spinach until it’s broken into teeny-tiny bits, then repeat as necessary until you’ve used up all the spinach and made a mixture close to a puree. (Or process the defrosted spinach mixture until smooth.)
Place the cubed paneer on the prepared baking sheet. Sprinkle it all over with the coriander, cumin, garam masala, and ½ teaspoon of the salt, then drizzle 2 tablespoons oil on top. Stir until the cheese is evenly coated in oil and spices. Evenly distribute the cheese across the pan. Bake for 10 minutes, stir, and then bake 3 to 5 more minutes until the paneer is nicely golden.
In a medium stainless steel skillet over medium heat, warm the remaining 2 tablespoons of oil. Add the onion mixture (reserve the bowl for later) and ¼ teaspoon of the of the salt. Cook for 5 to 7 minutes, until the onion is translucent and developing some golden color, stirring more and more frequently as time goes on to prevent burning.
Add the spinach and stir well. Add the cooked paneer, ½ cup water and ¼ teaspoon salt, stir, and cook for 7 to 10 minutes, until the mixture is warmed throughout and the flavors have melded.
Turn off the heat and remove the skillet from the hot burner. Transfer a couple of heaping spoonfuls of the spinach to the reserved bowl and stir in the yogurt (this tempers the yogurt so it doesn’t curdle—if you’re using cream, you can stir it directly into the skillet). Then add half of the yogurt mixture to the spinach, stir to combine, followed by the remaining yogurt mixture. Season to taste with additional salt (I usually add ⅛ teaspoon). Serve with an optional squeeze of lemon juice or chopped tomatoes on top to brighten the flavors, with warm rice or flatbread, if desired.