Melt butter in a large pot over medium. Sauté onion until soft, about 5 minutes, then add garlic for 30 seconds.
Sprinkle in flour and cook 1–2 minutes, stirring constantly to form a roux and remove raw flour taste.
Gradually whisk in broth, then stir in milk. Bring to a gentle simmer until slightly thickened, about 5 minutes.
Add broccoli and simmer 6–8 minutes until tender. Use an immersion blender to puree part of the soup for creaminess, leaving some florets whole.
Reduce heat to low and stir in shredded cheddar and Dijon until melted and smooth. Season with salt, pepper, and nutmeg if using.
Serve hot with optional bacon or croutons.