Bring a large pot of salted water to a boil. Add the spaghetti and cook according to package instructions until al dente. Reserve 1 cup of pasta water, then drain the spaghetti.
In a large skillet over medium heat, add the olive oil. Once hot, add the sliced garlic and red pepper flakes. Sauté for about 2-3 minutes, stirring frequently, until the garlic is golden but not burnt.
Add the drained spaghetti to the skillet, tossing to combine with the garlic oil. If the pasta seems dry, gradually add reserved pasta water, a few tablespoons at a time, until desired consistency is reached.
Stir in the chopped parsley and season with salt to taste. Toss everything together until well combined.
Serve immediately, topped with freshly grated Parmesan cheese if desired.