01 - Bring a large pot of salted water to a boil. Add spaghetti and cook until al dente, following package directions. Reserve 1/2 cup of pasta cooking water, then drain.
02 - Heat olive oil in a large skillet over medium heat. Add sliced garlic and cook, stirring frequently, until fragrant and lightly golden, about 2 minutes. Avoid burning the garlic.
03 - Add red pepper flakes if desired, along with salt and black pepper. Stir to combine evenly.
04 - Add drained pasta to the skillet and toss thoroughly to coat with garlic oil. Gradually add reserved pasta water to loosen and emulsify the sauce to desired consistency.
05 - Remove skillet from heat. Stir in Parmesan cheese, chopped parsley, lemon zest, and lemon juice if using. Toss until the cheese melts and the sauce is glossy.
06 - Plate immediately and garnish with extra Parmesan and parsley.