Melt the butter in a heavy-bottomed pot over medium heat until it starts to sizzle softly and smells buttery, about 1 minute.
Add the diced onion and cook, stirring occasionally, until it becomes translucent and fragrant, about 5 minutes. The onions should turn soft and slightly golden.
Stir in the minced garlic and cook for another 30 seconds until fragrant, making the kitchen smell warm and savory.
Add the chopped broccoli to the pot, stirring to coat it with the aromatic mixture. Cook for 3-4 minutes until the broccoli brightens in color and begins to soften slightly.
Pour in the vegetable broth and bring the mixture to a gentle simmer. Let it cook for about 10 minutes until the broccoli is tender but still vibrant green.
In a small bowl, whisk together the flour with a splash of cold water to make a smooth slurry. Stir this into the simmering soup, stirring constantly, to thicken the broth and cook out the raw flour taste, about 2-3 minutes.
Gradually add the shredded cheddar cheese, stirring constantly until it melts completely and the soup becomes creamy and smooth.
Use an immersion blender directly in the pot to blend the soup until velvety smooth, or carefully transfer to a blender and puree in batches. Be cautious of hot splashes. Return to heat if needed.
Stir in the cream or milk to add richness, then squeeze in the lemon juice to brighten the flavors. Warm the soup gently for another 2 minutes, tasting and adjusting seasoning if needed.
Remove the soup from heat, let it rest for a minute, then ladle into bowls. Garnish with extra cheese or herbs if desired, and serve hot.