Preheat your oven to 350°F (175°C). Grease a 9×13-inch baking dish with non-stick spray or a little bit of butter.
2. Prepare the Casserole Mixture:
In a large mixing bowl, combine the thawed hashbrowns, shredded cheddar cheese, sour cream, cream of chicken soup, melted butter, diced onion (if using), garlic powder, onion powder, salt, and pepper.
Stir everything together until well combined. The mixture should be creamy and the hashbrowns should be evenly coated.
3. Assemble the Casserole:
Spread the hashbrown mixture evenly into the prepared 9×13-inch baking dish. Use a spatula to smooth it out.
4. Prepare the Topping:
In a small bowl, mix the crushed cornflakes or potato chips with 2 tablespoons of melted butter. Stir to coat the crumbs evenly.
Sprinkle the buttery cornflake mixture evenly over the top of the casserole.
5. Bake the Casserole:
Bake in the preheated oven for 45-55 minutes, or until the casserole is bubbly and golden brown on top. The edges should be slightly crispy, and a toothpick inserted in the center should come out clean.
6. Serve:
Let the casserole sit for 5-10 minutes before serving. This allows it to set and makes it easier to cut into portions.