Heat the olive oil in a large pot over medium heat. Add the onion and cook for 4 minutes until it softens.
Stir in the garlic, cumin, cinnamon, paprika, and ginger. Cook for 1 minute until the spices smell fragrant.
Add the sweet potato cubes, chickpeas, vegetable broth, and diced tomatoes. Bring the mixture to a boil.
Reduce the heat to low, cover the pot, and simmer for 20 minutes until the sweet potatoes are tender.
Stir in the spinach and cook for 2 minutes until it wilts. Add the lemon juice, then season with salt and black pepper to taste.
Serve the soup hot, topped with chopped cilantro if using.