Boil the pasta: Bring a large pot of salted water to a boil.
Cook the pasta until just shy of al dente. Reserve 1–1.5 cups of the starchy cooking water, then drain.
Prep the zucchini: While the pasta cooks, slice zucchini into thin half-moons or julienne strips. Thin pieces soften faster and meld into the sauce better.
Sauté the zucchini: In a large skillet, heat olive oil over medium.
Add zucchini with a big pinch of salt and a few grinds of black pepper. Cook 6–8 minutes, stirring often, until softened and lightly golden in spots.
Add garlic and heat: Push zucchini aside, add a touch more oil if dry, then stir in garlic and red pepper flakes. Cook 30–60 seconds until fragrant, not browned.
Build the sauce: Add butter (if using) and 1/2 cup reserved pasta water.
Stir and let it simmer a minute to get silky. Sprinkle in half the cheese and stir until melted and glossy.
Add lemon: Stir in lemon zest and 1–2 tablespoons lemon juice. Taste—add more juice for brightness if you like.
Keep heat on low.
Toss with pasta: Add drained pasta to the skillet. Toss vigorously, adding more pasta water as needed to create a creamy, clinging sauce. The starch in the water helps emulsify everything.
Finish with basil and cheese: Off the heat, fold in most of the basil and the remaining cheese.
Toss until the sauce is silky and the basil is fragrant.
Season and serve: Taste and adjust salt, pepper, and lemon. Plate with extra basil, a sprinkle of cheese, and a drizzle of good olive oil if you like.