Preheat the oven to 375°F (190°C) and grease a 9x13-inch baking dish.
Cook ground beef in a skillet over medium heat until browned. Add onion and garlic, cooking until fragrant. Drain excess grease.
In a bowl, whisk together the cream of mushroom soup, milk, salt, and pepper.
Layer the beef mixture in the baking dish, pour soup mixture over it, and top with hash browns. Sprinkle cheese over the top.
Cover with foil and bake for 30 minutes. Remove foil and bake another 15 minutes until golden and bubbly.