Bring a large pot of salted water to a boil.
Add the pasta and cook according to package instructions until al dente.
Heat olive oil in a large skillet over medium heat.
Add the chopped onion and sauté until translucent.
Stir in the minced garlic and sliced mushrooms, cooking until tender.
Pour in the heavy cream and stir to combine.
Let the sauce simmer for a few minutes until slightly thickened.
Add the grated Parmesan cheese and stir until melted.
Season with salt and pepper to taste.
Drain the pasta and add it to the skillet, tossing to coat in the sauce.