Melt the butter in a large heavy-bottomed pot over medium heat. Add the diced onion and cook for 5 to 6 minutes, stirring occasionally, until softened. Add the garlic and cook for 30 seconds.
Sprinkle in the flour and stir continuously for 1 minute. Gradually whisk in the broth until smooth, then whisk in the milk.
Add the broccoli and carrot. Bring the soup to a gentle simmer and cook uncovered for 12 to 15 minutes, stirring occasionally, until the broccoli is tender. Avoid a hard boil.
For a thicker texture, transfer about 1 cup of soup to a blender, blend carefully, and return it to the pot, or briefly use an immersion blender. Leave some broccoli pieces intact.
Reduce the heat to low. Stir in the grated cheddar a handful at a time until melted. Do not boil after adding the cheese. Season with salt, pepper, and optional nutmeg; taste and adjust before serving.
Serve the soup hot, with extra cheddar and crusty bread if desired.