Heat oil in a large pot over medium heat. Add cumin seeds and toast for 30 seconds until fragrant.
Add chopped onion and sauté for 5-7 minutes until soft and translucent.
Stir in minced garlic, grated ginger, turmeric, coriander, and red pepper flakes. Cook for 1 minute until aromatic.
Add diced sweet potato, chickpeas, diced tomatoes with juices, and coconut milk. Stir to combine.
Bring mixture to a boil, then reduce heat to low, cover, and simmer for 20-30 minutes until sweet potatoes are fork-tender.
Optional: Using a potato masher, lightly mash about one-third of the mixture to thicken the sauce.
Stir in baby spinach and cook for 2-3 minutes until wilted.
Season with salt and freshly ground black pepper to taste. Serve hot.