Melt the butter in a large pot over medium heat. Add the onion, salt, and black pepper and cook, stirring, for 5 minutes, or until softened. Stir in the garlic and cook for another minute, then sprinkle in the flour and whisk continuously for 1 to 2 minutes, or until the flour turns golden. Slowly pour in the milk, whisking continuously.