Preheat the oven to 350°F and lightly grease a casserole dish or oven-safe skillet.
In a large bowl, stir together the shredded cheese, sour cream, cream of chicken soup, half of the melted butter, diced onion, garlic salt, onion powder, and black pepper until well combined.
Gently fold in the thawed and drained hash browns, mixing just until everything is evenly coated without overworking the potatoes.
Spread the mixture evenly into the prepared baking dish and smooth out the top.
In a separate bowl, mix the remaining melted butter with the cornflakes until coated, then sprinkle the mixture evenly over the potatoes.
Place the dish in the oven and bake uncovered until the casserole is bubbling around the edges and the topping is golden brown, rotating the pan halfway through for even cooking.
Remove from the oven and let the casserole rest briefly before serving to allow it to set slightly.