Bring a pot of salted water to a boil and cook the spaghetti until al dente. Reserve half a cup of pasta water before draining.
Heat olive oil in a large pan. Add the garlic slices and let them turn golden and fragrant.
Toss in the sliced mushrooms and sauté until tender and slightly browned.
Sprinkle in the chili flakes, salt, and black pepper. Stir well to coat the mushrooms.
Add the cooked spaghetti to the pan along with a splash of reserved pasta water. Toss everything together until glossy.
Finish with chopped parsley and a shower of parmesan if you like. Serve warm.