Melt the butter in a large pot over medium heat. Add the onion and cook for 5 minutes, until soft, then add the garlic and cook 30 seconds more.
Whisk in the flour and cook for 1 minute, stirring constantly.
Whisk in the broth in a slow stream, then whisk in the milk. Bring to a gentle simmer.
Add the broccoli, cover, and simmer for 10-12 minutes, until tender.
Remove the pot from the heat. Stir in the cheddar one handful at a time until melted, then season with the salt and pepper.
Ladle into bowls. For a smoother soup, blend about half of it with an immersion blender and stir it back in.