Bring a large pot of salted water to a boil, then add the pasta and cook until just al dente, about 8 minutes. Drain, reserving a quarter cup of pasta water, and set aside.
While the pasta cooks, heat the olive oil in a large skillet over medium heat. Add the sliced leeks and cook gently for about 8-10 minutes, stirring occasionally, until they become soft, translucent, and slightly caramelized with a fragrant aroma.
Add the chopped mushrooms to the skillet with the leeks and increase the heat slightly. Cook for about 5-7 minutes, stirring often, until the mushrooms are browned and fragrant, with their juices evaporated and edges slightly crispy.
If using garlic, add the minced cloves to the skillet and cook for about 30 seconds until fragrant, stirring constantly to prevent burning. This adds a subtle punch of aroma to the earthy base.
Pour in the reserved pasta water to deglaze the skillet, scraping up any browned bits stuck to the bottom. Stir well to create a loose, flavorful sauce base.
Add the drained pasta directly into the skillet, tossing gently to coat it with the sauce and ingredients. Let it cook together for 1-2 minutes so the flavors meld and the pasta absorbs some of the sauce.
Remove the skillet from heat and stir in the freshly grated Parmesan, or sprinkle nutritional yeast for a vegan option. Taste and adjust the seasoning with salt and pepper as needed.
Serve the pasta hot, garnished with extra cheese or herbs if desired. Enjoy the earthy, savory flavors and the beautiful golden edges from caramelized leeks and mushrooms.