Melt the butter in a large Dutch oven or heavy-bottomed pot over medium heat. Add the chopped yellow onion and cook until translucent, about 3 to 4 minutes.
Stir in the minced garlic and cook for an additional 30 seconds until fragrant, ensuring it does not brown.
Sprinkle the flour over the onion and garlic mixture. Whisk constantly for 1 to 2 minutes to cook off the raw flour taste and form a roux.
Gradually pour in the vegetable broth and heavy cream, whisking continuously to prevent any lumps from forming. Bring the mixture to a gentle simmer.
Add the chopped broccoli florets, grated carrots, and nutmeg. Reduce the heat to medium-low, cover, and let simmer for 15 to 20 minutes until the vegetables are fork-tender.
Remove the pot from the heat. Gradually stir in the freshly grated sharp cheddar cheese a handful at a time, allowing it to melt completely into a smooth, creamy soup.
Season with salt and freshly ground black pepper to taste. Ladle the hot soup into bowls and serve immediately.