Heat olive oil in a large skillet or Dutch oven over medium heat. Add the chopped onion and sauté until softened, about 5-7 minutes.
Add the minced garlic and red pepper flakes (if using) and cook for another minute until fragrant, being careful not to burn the garlic.
Stir in the orzo pasta and toast it for about 1-2 minutes, stirring constantly, until it smells slightly nutty.
Pour in the vegetable broth and bring to a boil. Reduce heat to low, cover, and simmer for about 10-12 minutes, or until most of the liquid is absorbed and the orzo is al dente.
Stir in the rinsed and drained chickpeas, heavy cream, grated Parmesan cheese, and chopped sun-dried tomatoes. Cook for another 3-5 minutes, stirring, until the sauce has thickened slightly and everything is well combined.
Stir in the fresh spinach and cook until it wilts, about 1-2 minutes.
Season with salt and black pepper to taste. Garnish with fresh chopped basil before serving.
Notes
This dish is best served immediately. For a spicier kick, add more red pepper flakes. You can also add other vegetables like peas or bell peppers.