Melt the butter (or heat olive oil) in a large pot or Dutch oven over medium heat. Add the diced onion and cook until softened and translucent, about 5 minutes. Then, add the minced garlic and cook for another minute until fragrant. Avoid browning the garlic, as it can become bitter.
Add the broccoli florets and vegetable broth to the pot. Bring to a simmer, then reduce heat, cover, and cook until the broccoli is tender, about 15-20 minutes. The broccoli should be easily pierced with a fork.
Carefully transfer the soup to a blender (or use an immersion blender) and blend until smooth and creamy. Work in batches if using a regular blender to avoid overflow. For the smoothest texture, blend for a longer period of time and consider straining the soup through a fine-mesh sieve after blending.
Pour the blended soup back into the pot. In a separate small bowl, whisk together the flour with a little cold water to form a smooth slurry. Gradually whisk the slurry into the soup, stirring constantly. Bring the soup to a gentle simmer, allowing it to thicken slightly, about 5 minutes. Adjust the amount of slurry to achieve your desired thickness.
Stir in the heavy cream and nutmeg. Heat through gently, being careful not to boil. Season with salt and pepper to taste. Taste and adjust seasonings as needed.