Boil the diced sweet potatoes in a pot of salted water until tender, about 10-15 minutes. Drain and set aside.
Heat the vegetable oil in a large pan over medium heat.
Add the chopped onions and cook until they become golden brown, about 5-7 minutes.
Stir in the minced garlic and cook for an additional minute.
Add the ground cumin, ground coriander, turmeric, paprika, cinnamon, and cayenne pepper (if using). Cook for 1-2 minutes, allowing the spices to release their aroma.
Add the boiled sweet potatoes to the pan and stir to coat them evenly with the spices and onions.
Cook for an additional 5 minutes, allowing the sweet potatoes to absorb the flavors and become slightly caramelized. Stir occasionally to prevent sticking.
Adjust salt to taste.
Garnish with chopped fresh coriander leaves.
Enjoy your meal!