Preheat oven to 350°F. Grease a 9 by 13 inch baking dish.
In a large bowl, combine thawed hash browns, cream of mushroom soup, sour cream, melted butter, ranch seasoning mix, cheddar cheese, salt, and pepper. Mix until well combined.
Spread mixture evenly in the prepared baking dish.
Mix crushed cornflakes with melted butter and sprinkle evenly over the top.
Cover tightly with foil and bake for 30 minutes.
Remove foil and continue baking for 10-15 minutes until golden brown and bubbly around the edges.
Let stand for 5 minutes before serving.
Notes
Pro Tip: Cover the casserole with foil for the first 30 minutes of baking to lock in moisture, then remove the foil for the final 10-15 minutes to achieve that perfect golden, crispy cornflake topping!