Melt butter in a large pot or Dutch oven over medium heat.
Add onion and cook until softened, about 5 minutes. Add garlic and cook for another minute until fragrant.
Add mushrooms and cook, stirring occasionally, until they are softened and have released their moisture, about 8-10 minutes.
Sprinkle flour over the mushrooms and cook for 1 minute, stirring constantly.
Gradually pour in broth, whisking constantly to prevent lumps. Bring to a simmer.
Reduce heat to low, cover, and simmer for 15 minutes.
Remove from heat and carefully blend the soup using an immersion blender until smooth.
Stir in heavy cream, thyme, and parsley. Season with salt and pepper to taste.
Gently heat the soup through, being careful not to boil.
Ladle into bowls and garnish as desired.
Notes
For a dairy-free version, substitute heavy cream with full-fat coconut milk or cashew cream. For a gluten-free version, use a 1:1 gluten-free all-purpose flour blend.