Melt the butter in a small saucepan over medium heat until it is fully melted and bubbling.
The melted butter should be combined with the flour, which should be continuously whisked into a smooth paste. In order to cook the flour and make a roux, whisk continuously for about 1-2 minutes. In doing so, the cheese sauce will thicken.
Pour the milk in gradually, constantly whisking to avoid any lumps forming. The milk should be fully incorporated into the roux by whisking continuously.
Stir the mixture constantly over medium heat until it thickens and begins to boil. It’ll take a little while. Stir frequently to prevent the sauce from sticking to the pan’s bottom.
Add the shredded cheddar cheese to the mixture after lowering the heat to low. As soon as the cheese starts to melt and the sauce becomes smooth, whisk continuously.
Stir well after seasoning with salt and pepper. Season the cheese sauce with salt and pepper to taste. Stir well to incorporate the seasoning.
You can thin out the sauce if it is too thick for your taste by adding a little milk. After adding the milk, give the mixture a good stir to ensure that it is fully incorporated.