In a large pot or Dutch oven, melt the butter over medium heat. Add the diced onion and cook for 5 minutes until soft and translucent.
Stir in the minced garlic and cook for 1 minute until fragrant.
Sprinkle the flour over the onions and whisk for 1-2 minutes to cook out the raw flour taste, forming a light roux.
Gradually pour in the broth while whisking constantly to prevent lumps. Add the cubed potatoes and bring the mixture to a gentle boil.
Reduce the heat to medium-low, cover, and simmer for 15-20 minutes, or until the potatoes are fork-tender.
Use a potato masher or immersion blender to lightly mash some of the potatoes directly in the pot. This creates a thicker, creamier consistency while leaving some chunks for texture.
Stir in the milk and sour cream (if using). Season with salt and black pepper. Let it simmer for another 2-3 minutes to heat through.
Ladle into bowls and garnish with fresh chives, shredded cheese, or crispy bacon bits. Serve hot!