Fill a large pot with water and bring it to a boil over high heat. Add a generous pinch of salt.
Add the elbow macaroni to the boiling water and cook according to package instructions, usually about 8-10 minutes, until al dente. Drain the pasta in a colander and set aside.
In a medium saucepan, melt the butter over medium heat. Once melted, whisk in the flour to form a roux, cooking for about 1 minute until golden.
Gradually add the milk while whisking continuously to prevent lumps. Keep whisking until the mixture thickens, about 4-5 minutes.
Stir in the garlic powder, onion powder, and a pinch of salt and pepper. Once the sauce has thickened, remove from heat and stir in the shredded cheddar cheese until melted and smooth.
Add the drained macaroni to the cheese sauce, mixing well until the pasta is fully coated.
If preparing the baked version, preheat your oven to 350°F (175°C), transfer the macaroni and cheese mixture to a baking dish, sprinkle breadcrumbs evenly over the top and bake for 15-20 minutes until golden and bubbly.
Serve immediately, whether baked or not, allowing time to cool slightly if baked.