Bring a large pot of salted water to a boil. Cook the pasta according to package directions. Reserve 1/2 cup of the pasta water before draining.
Meanwhile, heat olive oil in a large skillet over medium heat. Add onion and cook until soft, about 5 minutes. Stir in garlic and red pepper flakes and cook for 30 seconds.
Add the canned salmon, breaking it up with a spoon. Season with salt and pepper. Stir in the heavy cream and bring to a gentle simmer.
Add the cooked pasta and Parmesan cheese to the skillet. Toss until the pasta is well coated, adding reserved pasta water a little at a time to reach desired consistency.
Serve immediately, garnished with chopped parsley or dill.