Start by dicing the onion and mincing the garlic, then set them aside.
Place a large heavy-bottomed pot over medium heat and add the butter. Once it melts and starts to foam, add the diced onion and minced garlic.
Sauté the mixture for about 5 minutes, stirring occasionally, until the onion becomes translucent and fragrant with a sweet aroma.
Pour in the broth and bring it to a gentle simmer. Add the broccoli florets and cook for about 8-10 minutes, until the broccoli is tender but still bright green.
Use an immersion blender or transfer the soup in batches to a blender, and blend until smooth and velvety. Be careful with hot liquids—blend carefully.
Return the pureed soup to the pot if using a blender, then stir in the shredded cheddar cheese gradually, allowing it to melt completely into the soup for a creamy texture.
Pour in the heavy cream if using, and stir to combine. Season with salt, pepper, and a pinch of nutmeg if desired. Taste and adjust seasoning as needed.
Allow the soup to simmer for another 2-3 minutes to meld all flavors, then turn off the heat.
Serve hot in bowls, garnished with extra cheese or fresh herbs if you like, and enjoy this comforting, cheesy green delight.