Cook the spaghetti according to package instructions in a large pot of salted boiling water until al dente. Drain and set aside, reserving 1/2 cup of pasta water.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and sauté for about 1 minute until fragrant.
Add the sliced zucchini to the skillet and cook for 4-5 minutes, stirring occasionally, until they are tender but still slightly crisp.
Stir in the drained diced tomatoes, dried basil, and dried oregano. Cook for an additional 3-4 minutes until heated through. Season with salt and pepper to taste.
Add the cooked spaghetti to the skillet along with the reserved pasta water. Toss everything together until well combined and heated through.
Serve immediately, topped with grated Parmesan cheese and fresh basil leaves if desired.