6 small potatoes, peeled and cubed
3 tablespoons butter
2 cups cubed fully cooked ham
1 small onion, finely chopped
1/4 cup butter
3 tablespoons all-purpose flour
1 1/2 cups milk
salt and ground black pepper to taste
1 (8 ounce) package shredded Cheddar cheese
1/4 cup bread crumbs
Place potatoes into a large pot and cover with salted water; bring to a boil. Reduce heat to medium-low and simmer until tender, about 20 minutes. Drain.
Preheat oven to 350 degrees F (175 degrees C).
Grease a 1 1/2-quart baking dish.
Melt 3 tablespoons butter in a skillet over medium heat. Stir in the ham and onion; cook and stir until the onion has softened and turned translucent, about 5 minutes.
Stir potatoes into ham mixture; transfer to the prepared baking dish.
Melt 1/4 cup butter in a saucepan over medium heat. Stir flour into melted butter until smooth.
Gradually whisk milk into flour mixture; season with salt and black pepper. Continue cooking and stirring until thickened, about 2 minutes.
Reduce heat to medium-low and stir Cheddar cheese into the white sauce until melted.
Pour sauce over ham and potatoes.
Sprinkle bread crumbs atop casserole.
Bake in the preheated oven until sauce is bubbly and browned, 25 to 30 minutes.