Preheat oven to 375°F (190°C).
Grease a baking dish with butter.
Cook sausage in a skillet over medium heat until browned.
Drain excess fat and set sausage aside.
In a large bowl, whisk together eggs, milk, salt, pepper, and garlic powder.
Spread hashbrowns evenly in the baking dish.
Add cooked sausage and chopped onion over the hashbrowns.
Pour the egg mixture evenly over the top.
Sprinkle shredded cheese on top.
Bake for 35–40 minutes until set and golden.
Let cool for a few minutes before slicing and serving.