Melt the butter in a large Dutch oven over medium heat. Add the chopped onion and cook for about 5 minutes, stirring occasionally, until soft and translucent. Stir in the garlic for 30 seconds.
Sprinkle the flour over the butter and onion. Whisk constantly for 1 to 2 minutes, until the mixture becomes a pale golden paste with no dry flour.
Gradually pour in the milk while whisking. Add the broth, broccoli, carrot and Dijon mustard. Bring to a gentle simmer.
Simmer for 15 to 20 minutes, stirring from the bottom occasionally, until the broccoli stems and carrot are tender.
For a creamier texture, briefly pulse part of the soup with an immersion blender while leaving some vegetables intact. This step is optional.
Remove the pot from the heat. Add the freshly shredded cheddar in small handfuls, stirring until each addition melts. Season with salt and black pepper. Add a splash of milk or broth if needed.