Cook the spaghetti or linguine according to package instructions until al dente. Reserve ½ cup of pasta water, then drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and sauté for about 1 minute until fragrant.
Add the salmon fillet to the skillet, cooking for about 4-5 minutes on each side or until the salmon is cooked through and flakes easily with a fork. Remove the salmon from the skillet and set aside.
In the same skillet, add the chopped spinach and cook until wilted, about 2-3 minutes.
Flake the cooked salmon into bite-sized pieces and return it to the skillet with the spinach.
Add the cooked pasta to the skillet along with the lemon zest, lemon juice, and reserved pasta water. Toss everything together until well combined. Season with salt, pepper, and red pepper flakes if using.
Serve immediately, topped with grated Parmesan cheese.