Create the Gravy Base: In a food processor, combine the quartered onions and the can of tomatoes with their liquid.
Blend until you have a smooth purée. You may need to do this in two batches depending on the size of your food processor.
Cook the Gravy: Heat the oil in a large, deep skillet or saucepan over medium heat. Carefully pour in the onion-tomato purée.
Season with salt, pepper, and the garam masala or curry powder.
Cook, stirring occasionally, for about 10 minutes, until the mixture thickens slightly and becomes saucelike.
Add Tofu and Peas: Add the cubed tofu and thawed peas to the skillet.
Stir gently to coat and continue to cook for about 5 minutes. The tofu will absorb the flavors and swell slightly, and the peas will become tender.
Finish with Coconut Milk: Pour in the coconut milk and stir to combine.
Bring the curry to a gentle simmer, but do not let it come to a rolling boil.
Cook for another minute or two, stirring occasionally, until heated through.
Garnish and Serve: Taste the curry and adjust the seasoning with more salt, pepper, or spice if needed.
Garnish generously with fresh cilantro and serve immediately over rice or with flatbread.