Melt butter in a large Dutch oven or pot over medium heat. Once hot, add chopped onions and season with salt and black pepper, to taste. Cook, stirring occasionally until the onions are soft and translucent, approximately 4-5 minutes.
Add garlic and cook, stirring frequently, for another 1-2 minutes.
Add mushrooms, rosemary, and thyme. Season with additional salt and black pepper, as desired, and stir to combine. Cook, stirring occasionally, until the mushrooms are nicely browned and start to release their liquids, approximately 5 minutes.
Add the Marsala wine and gently scrape up any brown bits from the bottom of the Dutch oven with a spatula. Cook 1-2 minutes or until the wine is reduced by one half and the strong aroma dissipates.
Add the chicken or vegetable broth and simmer for 10-15 minutes. Remove from heat and temper the heavy cream by adding a couple tablespoons of the hot soup to it before stirring it into the soup.
Create a slurry by adding 3 tablespoons of the hot liquid from soup to the flour in a medium bowl. Stir until thoroughly combined and no lumps remain. Stir the slurry into the soup to thicken. Taste and adjust seasonings, as desired, before serving. Enjoy!