Preheat the oven and grease a baking dish with butter or cooking spray.
Bring a large pot of salted water to a boil and cook the macaroni until just tender. Drain and set aside.
Melt butter in a saucepan over medium heat, then stir in flour and cook until it develops a light golden color and a slightly nutty aroma.
Gradually whisk in the milk until the mixture is smooth and thickened. Add the mustard, onion powder, cayenne, and black pepper, stirring to combine.
Add the cubed cheese and continue stirring until fully melted and smooth.
Combine the cooked macaroni with the cheese sauce, mixing gently until evenly coated.
Transfer the mixture to the prepared baking dish and top with shredded cheddar cheese.
Cover and bake until heated through and bubbling, then uncover and broil until the top is golden brown.