Heat 3 tablespoons olive oil in a large pot over medium heat. Add the garlic, leeks, rosemary,carrots, celery, red pepper flakes, and cook 2 minutes. Stir in the potato and tomatoes and cook 2 more minutes; season with salt and pepper.
Add stock or water and bring to a simmer (start with 4 or 5 cups of stock. Depending on how thick you want your minestrone, add another cup if you want it less thick). Cook, covered, for 10 minutes.
If you are adding orzo or a broken pieces of a thin spaghetti, bring soup to a boil and add them in now. When the pasta is almost done, add in the zucchini and peas. If you aren’t adding pasta to the soup, keep the soup on a simmer and add in the zucchini and peas and cook for about 10 minutes (or until the zucchini are tender).
If you did add the pasta, cook until the pasta is al dente (it will keep cooking in the soup because it is very hot, so check to make sure it doesn’t become too mushy).
Add spinach and parsley during the last 2 minutes of cooking time. Adjust seasonings and serve immediately.