Set your oven to 350°F (175°C). Grease a 9x13-inch baking dish to prevent sticking.
In a large bowl, combine cream of chicken soup, sour cream, melted butter, cheese, onions (optional), salt, and pepper. Stir until smooth.
Fold in the thawed hash browns gently, keeping them fluffy and well coated.
Spread the mixture evenly in the prepared dish, smoothing the top.
Mix crushed cornflakes (or crackers) with melted butter, then sprinkle over the casserole.
Bake for 45–55 minutes until bubbly and golden. Cover with foil if topping browns too fast.
Let cool 5–10 minutes before serving to set.