Melt the butter in a large pot over medium heat. Add the diced onion and cook until it softens, about 4 minutes.
Stir in the minced garlic and cook for 1 minute more until fragrant.
Add the broccoli florets and chicken broth to the pot. Bring the mixture to a simmer and cook until the broccoli is tender, about 10 minutes.
Use an immersion blender to partially puree the soup, leaving some broccoli pieces for texture.
Reduce the heat to low and stir in the heavy cream, salt, and black pepper.
Gradually add the shredded cheddar cheese, stirring until fully melted and the soup is smooth.