In a large pot or Dutch oven, melt the butter over medium heat. Add the diced onion and shredded carrot and cook for 4–5 minutes, stirring occasionally, until the onion is soft and translucent.
Sprinkle the flour over the vegetables and stir continuously for 1–2 minutes to form a roux. The mixture should look thick and lightly bubbly but not browned.
Slowly pour in the chicken broth while whisking or stirring to prevent lumps. Bring the soup to a gentle simmer.
Add the chopped broccoli, reduce the heat to medium-low, and let the soup simmer uncovered for 20–25 minutes, or until the broccoli is tender.
Stir in the milk and heavy cream. Keep the heat low and cook for 5 minutes, stirring occasionally.
Gradually add the shredded cheddar cheese, stirring constantly until fully melted and smooth. Do not let the soup boil.
Taste and adjust seasoning with salt and pepper if needed. Serve warm.