In a large pot or skillet, heat the olive oil over medium heat. Add the minced garlic and sauté until fragrant, about 1 minute.
Stir in the dried oregano, thyme, and red pepper flakes if using. Cook for an additional 30 seconds.
Add the spaghetti to the pot, followed by the vegetable broth, lemon zest, and lemon juice. Stir to combine.
Bring the mixture to a boil, then reduce the heat to medium-low and cover the pot. Let it simmer for about 10-12 minutes, stirring occasionally, until the pasta is al dente and most of the liquid is absorbed.
Stir in the halved cherry tomatoes and sliced olives, cooking for an additional 2-3 minutes until the tomatoes soften.
Remove the pot from heat and fold in the crumbled feta cheese. Season with salt and pepper to taste.
Garnish with freshly chopped parsley before serving.
Notes
Feel free to adjust the amount of red pepper flakes for desired spice level.