Heat olive oil in a large pot over medium heat. Add onion, carrots, and celery. Cook for about 5 minutes until softened.
Stir in garlic and cook for 1 minute until fragrant. Add thyme and basil.
Pour in chicken broth and bring to a boil.
Reduce heat to a simmer. Add shredded chicken and gnocchi. Cook for 5–7 minutes until gnocchi float and are tender.
Stir in spinach and heavy cream. Cook for an additional 2–3 minutes until spinach is wilted.
Season with salt and black pepper to taste. Serve warm with grated Parmesan cheese if desired.