Melt the butter in a large Dutch oven over medium heat. Add the chopped onion and cook for 4–5 minutes, stirring occasionally, until softened and translucent.
Sprinkle the flour over the onions and whisk continuously for 1–2 minutes. This cooks the flour and creates the base that will thicken the soup.
Slowly whisk in the half-and-half, followed by the chicken broth. Continue whisking until smooth, then bring the mixture to a gentle simmer.
Add the broccoli and shredded carrots. Reduce the heat to medium-low and simmer for 18–22 minutes, stirring occasionally, until the vegetables are tender.
For a smoother soup, use an immersion blender to briefly blend part of the soup while leaving plenty of broccoli and carrot pieces intact. You can also leave it completely chunky.
Remove the pot from the heat and gradually stir in the shredded cheddar until melted and smooth. Stir in the nutmeg, salt, and black pepper. Adding the cheese off the heat helps prevent the soup from becoming grainy.
Ladle the soup into bowls and serve immediately with crusty bread, sourdough, or a simple green salad.