In a Dutch oven or large pot, heat oil over medium heat. Add onion and garlic; cook, stirring occasionally, until onion is tender, 5 to 7 minutes. Add garam masala; cook, stirring, until fragrant, about 1 minute.
Add broth; bring to a boil. In batches, fill skillet with spinach; cook until wilted, adding more spinach as room becomes available, 2 to 3 minutes; season generously with salt and pepper.
Reduce heat to medium-low; simmer spinach until soft and liquid is mostly evaporated, about 30 minutes. Remove from heat and gently stir in tofu and yogurt; serve over rice.