Take a large pot filled with water and also add a big pinch of salt in it. Bring this to a boil on high heat. Once it starts boiling, add spaghetti and cook as per package instruction. Mine took 12 minutes. Do stir occasionally.
Once cooked, drain the pasta water and keep it aside.
Take olive oil and garlic in a cold pan.
Then turn the heat on medium. Let the oil and garlic heat up together, thus you will have garlic flavor infused in the oil.
After some time it starts to sizzle up and you will see bubbles in the olive oil. This time lower the heat to medium-low.
Slowly toast the garlic till they are light brown in color.
Add red pepper flakes. Turn OFF the stove.
Add drained pasta, parsley, parmesan cheese, pepper, and salt.
Toss well, so oil is coated to spaghetti well.
While toasting garlic, if you see that it is sizzling too fast then turn off the heat (remove the pan from heat) and it will get toasted in remaining heat.
If garlic is toasted on high or medium-high heat then it gets brown quickly, but won’t get garlic infused-oil. So keep the gas heat low to medium.