Melt the butter in a large pot or Dutch oven over medium heat. Add the onions and celery; cook for 3 minutes, stirring frequently, until the onions are translucent.
Add the garlic, salt, and black pepper. Cook for 1 minute, stirring often.
Stir in the flour and cook for 1–1½ minutes, stirring almost constantly, to cook out the raw flour taste.
Slowly add the broth, stirring briskly with a wooden spoon or whisk until the flour is dissolved.
Add the cream-style corn and ham. Stir well. Raise the heat and bring the soup to a simmer (about 5 minutes). Then lower the heat to medium-low, cover, and cook for 10 minutes, stirring occasionally to prevent sticking.
While the soup simmers, cook the frozen corn just enough to defrost—about half the recommended time on the package. Drain well.
Add the potatoes and corn to the soup. Raise the heat to bring it back to a simmer, then reduce to medium-low, cover, and cook for 15–20 minutes, or until the potatoes are tender. Stir occasionally to prevent sticking.
Lower the heat to low, add the half and half (or milk), stir well, cover, and cook gently for 2–3 minutes to heat through.
Taste and add more salt, if needed. (As a reference, we added ¾ teaspoon.) Serve in bowls and garnish with chives or green onions, if desired.