Did the sauce thicken when you cooked it? I tend to guess at the amounts for a white sauce, and sometimes I get the amount of flour wrong - too little - and it doesn’t thicken, and I find it works OK if you add more flour gradually, about a dessert spoon full at a time, and whisking it in, and seeing if the sauce thickens then.
I use the all-in-one method, where I bung cold milk, butter and flour in the pan, and heat it up, whisking as it comes to the bubble, and thickens. I am terrible at making a roux (when you melt the butter, add the flour, cooking it out for a moment or two, and then gradually add the milk, and whisk it until it thickens), and I saw a TV chef using the all-in-one method, and I have never looked back. It always works for me. The butter ensures that the flour doesn’t go into lumps, as long as you whisk it well while it cooks. I can’t recommend it highly enough.
I use a good, strong cheddar - I don’t use the pre-grated cheese because it has starch on it - and previous posters are right - you need to make sure the sauce is bubbling, otherwise the cheese won’t melt.