Heat olive oil in a large pot over medium heat.
Add diced onions and sauté until translucent, about 5 minutes.
Stir in minced garlic and cook for another minute.
Add diced carrots and cook for 2-3 minutes until slightly soft.
Add red lentils, cumin, turmeric, salt, and pepper, stirring well.
Pour in the vegetable broth and bring to a simmer.
Reduce heat and let the soup simmer for 15-20 minutes until lentils are tender.
Stir in chopped spinach (if using) and cook for another 2-3 minutes until wilted.
Taste and adjust seasoning as needed before serving.