Cook the fettuccine or spaghetti according to package instructions until al dente. Drain and set aside, reserving 1/2 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 translucent.
Add the minced garlic and sliced mushrooms to the skillet. Cook for another 5-7 minutes, stirring occasionally, until the mushrooms are browned and tender.
Stir in the dried thyme, then pour in the heavy cream. Bring the mixture to a gentle simmer and let it cook for about 3-4 minutes, allowing it to thicken slightly.
Add the grated Parmesan cheese to the sauce, stirring until melted and well combined. If the sauce is too thick, add some reserved pasta water to reach your desired consistency.
Season the sauce with salt and pepper to taste. Add the cooked pasta to the skillet, tossing to coat the noodles evenly with the sauce.
Serve immediately, garnished with chopped fresh parsley.