Boil the elbow macaroni in a large pot of salted water according to package instructions until al dente. Drain in a colander and set aside.
In a medium saucepan, melt the butter over medium heat. Once melted, whisk in the flour and cook for about 1-2 minutes, stirring constantly until it forms a paste (roux).
Gradually pour in the milk, whisking continuously to prevent lumps. Keep stirring until the mixture thickens and bubbles begin to form, about 5-7 minutes.
Remove the sauce from heat and stir in the shredded cheddar cheese until fully melted and combined. Add salt, black pepper, garlic powder, and onion powder (if using) to taste.
Combine the cooked macaroni with the cheese sauce, stirring until all the pasta is well-coated.
Preheat the oven to 350°F (175°C). Transfer the mac and cheese mixture into a greased 9x13-inch baking dish.
If desired, mix breadcrumbs and grated Parmesan cheese in a small bowl and sprinkle evenly on top of the mac and cheese for added texture.
Bake in the preheated oven for about 15-20 minutes or until the top is golden and bubbly. Remove from the oven and let it cool slightly before serving.