Turn the oven on to 350°F (175°C) and spray nonstick cooking spray on a 9 by 13-inch baking dish.
Thawed hashbrowns, cream of chicken soup, sour cream, melted butter, shredded cheddar cheese, diced onion, salt, and pepper should all be combined in a big mixing dish.
Blend until thoroughly blended.Fill the baking dish with the ingredients and spread it evenly.
Toss the crushed cornflakes with a tiny bit of melted butter (optional) in a different basin until they are well covered. Over the casserole, scatter the cornflake mixture.
Bake for 45 to 50 minutes, or until the casserole is bubbling and golden brown, in a preheated oven.
Before serving, take it out of the oven and allow it to cool somewhat.