Preheat the oven to 375 degrees. Cook the elbow macaroni in a large pot of boiling water until just tender, then drain and set aside.
In a medium saucepan, melt the butter over medium heat. Whisk in the flour and cook for one minute to form a roux.
Slowly whisk in the milk. Continue whisking until the mixture thickens, about 3 to 4 minutes.
Remove the saucepan from the heat. Stir in the shredded cheddar cheese until melted and smooth. Add the salt and black pepper.
Combine the cooked macaroni, diced ham, and frozen peas in a large bowl. Pour the cheese sauce over the mixture and stir until everything is evenly coated.
Transfer the mixture to a greased baking dish. Sprinkle the breadcrumbs evenly over the top.
Bake for 20 to 25 minutes until the top is golden and the edges are bubbling. Let it rest for 5 minutes before serving.