Melt butter in a large pot over medium heat.
Sauté onion, celery, and carrot with a pinch of salt until softened, 5–6 minutes.
Stir in garlic and cook until fragrant, about 30 seconds.
Sprinkle flour over the vegetables and stir for 1 minute.
Gradually whisk in the broth until smooth and simmering.
Add potatoes, thyme, and paprika. Simmer until potatoes are tender, 12–15 minutes.
Stir in corn and ham. Simmer 5 minutes to heat through.
Pour in milk and warm gently without boiling. Season with salt and pepper.
Ladle into bowls and garnish with parsley or scallions.