Prepare a thick béchamel sauce. Melt the butter in a saucepan over low heat. Stir in the flour, mixing constantly.
Mix until smooth, then gradually pour in the milk while stirring constantly.
Season with salt, pepper, and a pinch of nutmeg.
Cook over low heat without letting it boil. Stir constantly until the mixture reaches a thick, creamy consistency. Add a little flour if necessary to thicken it further.
Remove the pot from the heat. Stir in the selected grated cheese and the ham pieces.
Transfer the mixture to a container and refrigerate for at least 2 hours.
Prepare the breading by whisking the eggs and milk together in a bowl. Pour the breadcrumbs into a second bowl.
Remove the mixture from the refrigerator. Shape it into small patties, dip them in the egg-and-milk mixture, and then coat them generously with breadcrumbs.
Place the breaded croquettes on a baking sheet lined with parchment paper. Heat the frying oil until it is very hot.
Drop the croquetas into the hot oil and cook until they are a nice golden brown. Drain after cooking.
Place the croquetas on a plate lined with paper towels and let them cool slightly before serving.