Melt butter in a large pot over medium heat
Add chopped onion and cook until softened
Add minced garlic and cook briefly
Stir in diced potatoes, corn, broth, salt, and pepper
Bring to a boil, then reduce heat and simmer until potatoes are tender
Stir in milk or cream
Simmer gently until heated through
Mash some of the potatoes and corn slightly to thicken the chowder
Adjust seasoning to taste
Serve hot
