Bring a large pot of salted water to a boil.
Add spaghetti and cook according to package instructions until al dente.
Meanwhile, heat olive oil in a pan over medium heat.
Add minced garlic and sauté for 1 minute until fragrant.
Add broccoli florets to the pan and cook for 3-4 minutes until tender.
Drain the pasta, reserving some cooking water.
Add the drained pasta to the pan with broccoli.
Toss everything together, adding reserved pasta water as needed.
Stir in grated Parmesan cheese, salt, and pepper.
Serve warm, garnished with lemon zest if desired.