Preheat the oven to 350°F (175°C).
In a large skillet, heat over medium heat. Add the ground beef, diced onion, and minced garlic. Cook until the beef is browned and fully cooked, about 7-10.
In a large mixing bowl, combine the cooked beef mixture with the thawed hash browns, cream of mushroom soup, and milk. Add the salt, black pepper, paprika, garlic powder, and onion powder. Mix everything together until well combined.
Transfer the mixture to a greased 9x13-inch baking dish, spreading it out evenly. Sprinkle the shredded cheddar cheese evenly over the top. If using crushed cornflakes, mix them with melted butter and sprinkle over the cheese layer.
Cover the baking dish with aluminum foil and bake for 30. Remove the foil and bake for an additional 15-20, or until the cheese is bubbly and golden brown. Let cool for 5 before serving.