Cook the fettuccine or spaghetti according to package instructions until al dente. Drain and set aside, reserving ½ cup of the pasta water.
In a large skillet, heat the olive oil over medium heat. Add the chopped onion and sauté for about 3-4 minutes until softened.
Add the minced garlic and cook for an additional 1 minute until fragrant.
Stir in the flaked salmon and cook for 2-3 minutes, allowing it to warm through.
Pour in the heavy cream and bring to a gentle simmer. Stir in the spinach and lemon juice, cooking until the spinach is wilted (if using fresh) or heated through (if using frozen).
Season with salt and pepper to taste. If the sauce is too thick, add some reserved pasta water until desired consistency is reached.
Toss the cooked pasta into the skillet with the sauce, mixing well to coat.
Remove from heat and stir in the grated Parmesan cheese and fresh dill, if using. Serve immediately.