In a large pot, melt the butter over medium heat. Add the chopped onions and cook for about 3-4 minutes until they become translucent.
Add the minced garlic and sliced mushrooms to the pot. Cook for approximately 5-7 minutes until the mushrooms have softened and released their moisture. Stir occasionally.
Sprinkle the flour over the mushroom mixture and stir well to combine. Continue to cook for another 2-3 minutes to eliminate the raw taste of the flour.
Slowly pour in the vegetable or chicken broth while stirring constantly to prevent lumps. Bring the mixture to a gentle boil.
Add the bay leaf and dried thyme to the pot. Reduce the heat to a simmer and let the soup cook for about 15-20 minutes, allowing the flavors to meld.
Remove the bay leaf from the soup and discard it.
Use an immersion blender to puree the soup directly in the pot until smooth and creamy. If you don’t have an immersion blender, you can carefully transfer the soup in batches to a regular blender, blend until smooth, and return it to the pot.
Stir in the heavy cream and continue to simmer for an additional 5 minutes. Be careful not to let the soup boil after adding the cream to prevent curdling.
Taste the soup and adjust the seasoning with salt and black pepper to your liking.
Serve hot, garnished with fresh parsley.