In a large pot, melt the butter over medium heat. Add onions and garlic, sautéing until translucent.
Add diced potatoes to the pot, stirring well to combine with the onions and garlic.
Pour in the chicken or vegetable broth, ensuring that the potatoes are submerged. Increase the heat and bring the mixture to a boil.
Once boiling, reduce the heat and let the soup simmer until the potatoes are tender, around 20 minutes.
Using a blender or immersion blender, partially puree the soup, leaving some potato chunks for texture.
Return the soup to low heat, stir in heavy cream, cheddar cheese, and bacon (if using). Continue to stir until the cheese is melted and the soup is heated through.
Season with salt and pepper according to taste.
Serve hot, garnishing with additional cheddar cheese and green onions.