Boil a large pot of salted water. When it’s rolling, drop in the pasta and cook until al dente. Reserve a cup of the cooking water, then drain.
While the pasta cooks, warm the olive oil in a large skillet over medium heat. Add the sliced garlic and a pinch of salt. Cook, stirring, until the garlic is just starting to turn golden—don’t rush this; burned garlic is tragic.
Sprinkle in red pepper flakes. Give it a quick stir and let the aroma bloom for about 30 seconds.
Toss the drained pasta into the skillet with the garlic oil. Add a splash of the reserved pasta water to loosen everything up and help the sauce cling to the spaghetti.
Season with black pepper and salt as needed. Toss vigorously until every strand wears a glossy coat. If it looks dry, add a bit more pasta water.
Finish with parsley and cheese if you’re using them. Serve immediately, while it’s hot and glistening.