Heat the oven to 350°F (176°C). Lightly grease an 8 × 11-inch casserole dish and set it aside.
Bring a large pot of salted water to a rolling boil. Add the elbow macaroni and cook according to the package directions until al dente. For firmer pasta after baking, remove it from the water slightly before it becomes fully tender.
Drain the cooked macaroni thoroughly in a colander and set aside.
Place a large nonstick skillet over medium heat. Add the unsalted butter and allow it to melt, swirling the pan as needed to coat the surface.
Sprinkle the flour into the melted butter and whisk continuously until a smooth roux forms. Continue cooking and whisking for 1 to 2 minutes to eliminate the uncooked flour flavor.
Gradually stream the whole milk into the roux while whisking continuously to maintain a smooth consistency.
Add the garlic powder, onion powder, and black pepper, whisking until evenly incorporated.
Bring the sauce to a gentle simmer and continue cooking for approximately 3 minutes, whisking frequently, until the mixture becomes noticeably thicker.
Add the cubed Velveeta and stir continuously until the cheese has completely melted into the sauce and the texture is smooth.
Remove the skillet from the heat. Taste and season with salt as needed. Allow the sauce to stand for about 1 minute before adding the pasta.
Transfer the drained macaroni to the prepared cheese sauce. Stir gently until every piece of pasta is thoroughly coated.
Spoon the macaroni and cheese mixture into the greased casserole dish and spread it into an even layer.
Distribute the freshly shredded sharp cheddar evenly across the top of the macaroni.
Place the casserole in the preheated oven and bake for approximately 10 minutes, or until the cheddar has fully melted.
For a bubbly, golden-brown finish, switch the oven to the broil setting and cook for an additional 2 to 4 minutes. Monitor the casserole closely during broiling to prevent the cheese from burning.