Heat oven to 350°F; grease a 9-by-13-inch dish with 1 tbsp butter.
Squeeze thawed hash browns firmly in a clean towel until no longer dripping.
Melt remaining 3 tbsp butter in a saucepan over medium heat. Cook onion about 5 minutes until translucent.
Stir in flour; cook 1 minute. Whisk in milk; simmer 3 to 4 minutes until sauce coats a spoon.
Remove from heat; stir in sour cream, salt, pepper, and 1 1/2 cups cheddar until mostly smooth.
Fold sauce through potatoes; spread evenly in dish. Scatter remaining 1/2 cup cheddar on top.
Bake 45 to 50 minutes until center bubbles and edges are deeply browned. Rest 10 minutes before serving.