Makes about 2 1/2 cups
Melt butter in a 1-quart saucepan over medium heat. Add flour and stir to incorporate and form a roux. Continue to stir until roux is a blonde color, 1 to 2 minutes. Add onion, garlic, and thyme. Cook, stirring often, until onion and garlic are soft and lightly caramelized, 3 to 4 minutes. Add milk and stir to incorporate. Add salt, pepper, and nutmeg, and cook until sauce has reduced and no floury taste remains, about 20 minutes. Whisk cheese into sauce. Serve immediately or set aside and reheat when ready to use.