Place a saucepan over medium heat and add butter.
Once the butter melts, add all-purpose flour and whist until the two ingredients combine well and you get a paste or crumble-like consistency.
Take the saucepan off the heat and slowly pour in the milk. Make sure you whisk it constantly to prevent lumps from forming.
Place the saucepan back on the heat and cook the mixture for 5 minutes or until you get a thick simmering sauce.
Take the saucepan off the heat again and add shredded cheddar cheese. Mix well until the cheddar cheese melts away.
Season the sauce with garlic powder, black pepper, and salt.
The cheese sauce for your homemade macaroni and cheese is ready.