Cook the pasta: Bring a large pot of salted water to a boil. Cook the spaghetti until al dente according to the package instructions. Reserve ½ cup of the pasta water, then drain the pasta.
Sauté the garlic: While the pasta is cooking, heat olive oil in a large skillet over medium heat. Add sliced garlic and sauté until golden brown, about 2 minutes. Be careful not to burn it.
Add chili flakes: Stir in the red pepper flakes and sauté for 30 seconds to release the heat and aroma.
Combine with pasta: Add the drained pasta directly to the skillet along with a splash of reserved pasta water. Toss everything together using tongs until the pasta is well coated with the oil and garlic.
Season and finish: Add salt, black pepper, and parsley if using. Toss again. Let simmer for 1–2 minutes until flavors meld and water is absorbed. Add more pasta water if needed.
Serve: Plate the spaghetti hot. Top with a drizzle of olive oil and a sprinkle of grated Parmesan, if desired.