Bring a large pot of salted water to a boil and cook spaghetti according to package instructions until al dente.
While pasta is cooking, heat olive oil in a large skillet over medium heat. Add minced garlic and sauté for 1-2 minutes until fragrant but not browned.
Drain pasta, reserving 1 cup of pasta water. Add pasta to the skillet with garlic, lemon zest, and lemon juice.
Toss pasta with parmesan cheese, adding reserved pasta water a little at a time to loosen the sauce. Season with salt, pepper, and red pepper flakes if using.
Remove from heat and stir in chopped parsley. Serve immediately with extra parmesan if desired.
Notes
This lemon pasta is great paired with a light salad or grilled chicken. Leftovers keep well refrigerated for up to 2 days.