Put a big pot of water on the stove and add generous amounts of salt. The water should taste like the ocean. Let it come to a rapid boil over high heat.
Add the spaghetti and immediately stir to submerge all of the pasta. Don’t add oil to the water. Set the timer for the number of minutes indicated on the pasta packaging. Keep the water boiling rapidly, and stir the pasta occasionally.
Peel the garlic, then smash the cloves with the side of your knife and mince them.
When the pasta is near its cooking time, ladle out about a cup of the pasta water into a small bowl or a heatproof measuring cup.
Take the pot off the stove using oven mitts so you don’t burn your hands, and strain the pasta in a colander. Don’t rinse the pasta.
Put the empty pot back on the stove over medium-low heat. Add a decent amount of olive oil (count to three while pouring). Add the garlic, a shake of red chile flakes (optional), and salt and pepper. Cook for a minute or so, stirring and making sure the garlic doesn’t burn.
Put the pasta back in the pot, add half of your reserved pasta water, and stir to coat. Add the rest of the pasta water, and stir again. You want the pasta to have a little bit of a sauce rather than being fried spaghetti. Add more salt and pepper to taste. Turn off the heat. Grate Parmesan cheese on your pasta, if you like, and serve.