Preheat your oven to 350°F (175°C).
Prepare the Baking Dish: Grease a 9x13-inch baking dish with cooking spray or lightly coat it with butter or oil.
Sauté the Onion and Garlic: In a medium skillet, melt the butter over medium heat. Add the diced onion and chopped garlic (or garlic powder) and sauté for 2-3 minutes until soft and translucent.
Combine the Ingredients: In a large mixing bowl, combine the sautéed onion and garlic, shredded hash browns, shredded cheddar cheese (or vegan option), condensed cream of mushroom soup (or vegan alternative), water, salt, and pepper. Stir everything until well combined.
Transfer to Baking Dish: Pour the mixture into the greased baking dish, spreading it out evenly.
Bake: Cover the dish with aluminum foil and bake in the preheated oven for about 45 minutes. Then, remove the foil and bake uncovered for an additional 15-20 minutes or until the top is golden brown, the edges are bubbly, and the casserole is heated through (center should reach at least 165°F/74°C).
Serve: Remove from the oven and let it cool for a few minutes before serving. This will allow it to set a bit and make it easier to slice and serve.
Enjoy your oven-baked hash brown casserole as a hearty, cheesy side dish or main course!