Cook the spaghetti in a large pot of salted boiling water according to package directions until al dente. Drain, reserving 1/2 cup of pasta water.
While the pasta cooks, melt the butter in a large nonstick skillet over medium‑low heat. Add the minced garlic and sauté 3–5 minutes, stirring frequently, until fragrant and lightly golden.
Stir in the chopped basil and spinach, cooking just until the greens wilt, about 1–2 minutes. Season with salt and pepper.
Add the cooked spaghetti to the skillet, tossing to coat. If the sauce seems dry, add a splash of the reserved pasta water. Mix in the grated Parmesan and adjust seasoning if needed.
Serve immediately, topped with an extra pat of butter and additional Parmesan if desired.
Notes
For extra flavor, try adding a pinch of red‑pepper flakes or a squeeze of fresh lemon juice just before serving.