Cook the pasta: Bring a large pot of salted water to a boil. Cook the pasta until just shy of al dente.
Reserve 1 cup of pasta water, then drain.
Sauté the mushrooms: Heat olive oil in a large skillet over medium-high. Add mushrooms in a single layer and let them brown undisturbed for 3–4 minutes. Stir, add a pinch of salt, and cook until deep golden and tender.
Push to the sides of the pan.
Build flavor: Add butter (if using), onion or shallot, and a pinch of salt. Cook 2–3 minutes until softened. Stir in garlic for 30 seconds until fragrant.
Deglaze: Pour in the broth.
Scrape up any browned bits and simmer for 2–3 minutes to reduce slightly.
Make it creamy: Lower the heat. In a small bowl, whisk Greek yogurt with milk until smooth. Off the heat, stir the yogurt mixture into the skillet.
Return to low heat and warm gently. Do not boil.
Season: Add lemon zest, a squeeze of lemon juice, black pepper, a pinch of nutmeg, and red pepper flakes if you like heat. Taste and adjust salt.
Add greens: Stir in spinach until wilted, about 1 minute.
If the sauce seems thick, loosen with a splash of reserved pasta water.
Toss with pasta: Add the drained pasta to the skillet. Sprinkle in Parmesan and toss over low heat until glossy and well-coated. Add more pasta water a little at a time for a silky finish.
Finish and serve: Top with chopped parsley or thyme, extra Parmesan, and more black pepper.
Serve warm with lemon wedges on the side.