Bring a large pot of salted water to a boil. Cook the spaghetti according to package instructions until al dente. Reserve about 1 cup of pasta water before draining the pasta.
In a large skillet, melt the unsalted butter over medium heat until slightly bubbling.
Add minced garlic and optional red pepper flakes to the skillet. Sauté for about 2-3 minutes, stirring continuously until fragrant and lightly golden.
Add the drained pasta to the skillet with the garlic butter. Toss to coat the pasta evenly in the sauce.
Gradually add reserved pasta water as needed to reach your desired sauce consistency.
Season with salt and black pepper to taste.
Remove from heat and stir in the grated Parmesan cheese until melted and combined.
Serve immediately, garnished with fresh parsley.
Notes
Feel free to add cooked chicken, shrimp, or vegetables to make the dish heartier.For a richer flavor, you can use browned butter instead of regular melted butter.Adjust the amount of garlic according to your preference.