Add the sliced mushrooms to the skillet with the onions. Cook for about 8-10 minutes, stirring occasionally, until the mushrooms are browned and have released their moisture.
Add the Garlic and Thyme:
Stir in the minced garlic and thyme leaves. Cook for another 1-2 minutes until the garlic is fragrant.
Deglaze the Pan (Optional):
If using, pour in the white wine or broth to deglaze the pan, scraping up any browned bits from the bottom. Let the liquid cook off for about 2-3 minutes.
Season:
Season with salt and pepper to taste.
Finish and Serve:
Remove from heat and sprinkle with chopped fresh parsley if desired.
Serve immediately as a side dish or a topping for steaks, burgers, chicken, or other dishes.