In a large pot, melt the butter over medium heat. Add the chopped onion and cook until soft and translucent, about 5 minutes.
Add the minced garlic and cook for another minute until fragrant.
Add the diced potatoes and chicken or vegetable broth to the pot. Bring to a boil, then reduce the heat and simmer until the potatoes are tender, about 15 minutes.
Add the broccoli florets and continue to cook until the broccoli is tender, about 5 minutes.
Using an immersion blender, blend the soup until smooth. If you don’t have an immersion blender, carefully transfer the soup to a blender in batches and blend until smooth.
Return the blended soup to the pot and stir in the milk, heavy cream, and shredded cheddar cheese. Cook over low heat until the cheese is melted and the soup is heated through, about 5 minutes.
Season with salt and pepper to taste.
Ladle the soup into bowls and top with crumbled bacon. Serve hot.