Heat butter or oil in a pot over medium heat
Add chopped onion and cook until soft
Add minced garlic and cook for 30 seconds
Add sliced mushrooms and cook until they release moisture and brown
Stir in salt, black pepper, and thyme
Add flour and cook for 1 minute, stirring constantly
Pour in vegetable or chicken broth gradually while stirring
Bring to a gentle simmer
Cook for 10 to 15 minutes
Add milk or cream and stir well
Simmer for 2 to 3 minutes without boiling
Adjust seasoning to taste
Serve hot
Garnish with parsley if desired
