Cook spaghetti until al dente according to package instructions, reserving 1 cup of the cooking water.
When pasta has about 5 minutes left to cook, heat 2 tablespoons of the olive oil in a large, non-stick skillet over medium heat. Add garlic, broccoli and kosher salt; cook and stir until broccoli is tender and garlic is lightly browned, about 5 minutes (take care not to burn the garlic). Add cooked pasta, remaining 2 tablespoons of olive oil, red pepper flakes and ¼ cup of the reserved pasta water (plus more as needed); cook and stir until heated through, 2 to 3 minutes. Season to taste with salt and pepper. Transfer to serving bowl and sprinkle parmesan cheese evenly over the top; serve.