In a large pot, heat the olive oil over medium heat. Add the diced onion and sauté for about 5 minutes until translucent.
Stir in the minced garlic, diced carrots, and celery. Cook for another 5 minutes until the vegetables begin to soften.
Add the dried thyme, oregano, and red pepper flakes (if using) to the pot. Stir well to combine and cook for 1 minute until fragrant.
Pour in the vegetable broth and bring the mixture to a boil. Once boiling, add the orzo pasta and cook according to package instructions, usually about 8-10 minutes.
When the orzo is al dente, stir in the chickpeas and chopped spinach. Cook for an additional 2-3 minutes until the spinach is wilted.
Remove the pot from heat and stir in the lemon juice. Season with salt and pepper to taste.
Serve hot, garnished with fresh parsley.