Clean the mushrooms thoroughly and slice them. Dice the onion and mince the garlic.
In a large pot or Dutch oven, melt the butter over medium heat. Add the diced onion and minced garlic. Sauté until the onion becomes translucent, about 3-4 minutes.
Add the sliced mushrooms to the pot. Cook, stirring occasionally, until the mushrooms release their moisture and start to brown, usually about 5-7 minutes.
Sprinkle the flour over the mushroom mixture. Stir well to combine and cook for another 2 minutes to remove the raw taste of the flour. Gradually pour in the chicken or vegetable broth while stirring constantly to avoid lumps.
Bring the mixture to a gentle boil, then reduce the heat to low and let it simmer for about 10-15 minutes. This helps the flavors meld together and the soup to thicken slightly.
Pour in the milk and stir until well combined. Gradually add the shredded cheddar cheese, stirring continuously until the cheese melts completely into the soup, creating a creamy consistency.
Taste the soup and season with salt and pepper as needed, adjusting to your preference.
Ladle the cheesy mushroom soup into bowls. Optionally, garnish with chopped parsley or chives for added freshness and serve hot. You can also add a sprinkle of extra shredded cheese on top if desired.