Preheat and prep: Heat the oven to 350°F (175°C).
Lightly grease a 9x13-inch baking dish with cooking spray or butter.
Thaw the potatoes: If your hashbrowns aren’t thawed, spread them on a sheet pan and let them sit at room temperature for 20–30 minutes. Pat dry with paper towels to remove excess moisture.
Mix the sauce: In a large bowl, stir together the condensed soup, sour cream, melted butter, garlic powder, salt, and pepper until smooth.
Add cheese and onion: Fold in 1 1/2 cups of the shredded cheddar and the chopped onion. Reserve the remaining 1/2 cup cheese for topping.
Combine with hashbrowns: Add the thawed hashbrowns to the bowl and gently mix until everything is evenly coated.
Avoid overmixing to keep the shreds intact.
Transfer to the pan: Spread the mixture evenly in the prepared baking dish, smoothing the top.
Top it: Sprinkle the remaining 1/2 cup cheddar over the surface. For a crunchy finish, toss crushed cornflakes or panko with 2 tablespoons melted butter and scatter over the cheese.
Bake: Bake uncovered for 45–55 minutes, until the edges are bubbly and the top is golden. The center should be hot and set.
Rest and serve: Let it rest for 10 minutes before scooping.
This helps it firm up for cleaner servings.