In the same skillet, melt the butter over medium heat.
Add the chopped onions and garlic, sautéing until softened and fragrant.
Add the sliced mushrooms and cook until they release their moisture and turn tender.
Sprinkle the flour over the mushroom mixture, stirring constantly to create a roux.
Slowly pour in the beef broth, stirring continuously until the mixture thickens and is smooth.
Lower the heat and stir in the heavy cream or half-and-half. Let it simmer for a few minutes until the soup is creamy and well combined. Season with salt and pepper to taste.
Use a blender to really mix the flavors well, transfer to a bowl then serve.