Heat olive oil in a large skillet over medium heat and add the sliced mushrooms. Let them cook undisturbed at first so they brown properly. Stir occasionally until golden and tender.
Add minced garlic and butter, then cook briefly until fragrant. Season with salt and pepper and set the mushrooms aside.
Bring a large pot of salted water to a boil. Add the gnocchi and cook until they float to the surface, which usually takes just a few minutes.
Drain the gnocchi well and keep them ready while you finish the sauce.
In a saucepan, melt butter over medium heat and add garlic. Cook gently until fragrant but not browned.
Pour in the heavy cream and broth, letting it simmer gently. Slowly stir in the parmesan until fully melted and smooth. Add nutmeg if using.
Add the cooked gnocchi and mushrooms directly into the sauce. Gently toss until everything is evenly coated.