Clean mushrooms with a damp cloth and slice evenly.
Heat butter or olive oil in a large skillet over medium heat.
Add diced onion and cook for about 3 minutes until softened.
Add mushrooms and cook until they release moisture and begin to brown.
Stir in garlic and thyme and cook for about 30 seconds.
Sprinkle flour over the mixture and stir well to coat. Cook for 1 minute.
Slowly pour in vegetable broth while stirring continuously to prevent lumps.
Add soy sauce and black pepper.
Simmer for 5 to 7 minutes until thickened.
Taste and adjust salt if needed.
Serve warm over mashed potatoes, rice, or vegetables.