Heat butter or oil in a skillet over medium-low heat. Add onions with a pinch of salt and cook 20–25 minutes, stirring occasionally, until soft and golden. Set aside.
In the same skillet, brown ground beef over medium heat. Season with 1 tsp salt, garlic powder, onion powder, smoked paprika, and black pepper. Drain excess grease if needed. Stir in caramelized onions.
Preheat oven to 375°F. Grease a 9x13-inch baking dish.
Spread shredded potatoes evenly in the bottom of the dish and season lightly with remaining ½ tsp salt.
Spoon beef and onion mixture evenly over the potatoes.
Top with shredded cheese.
Cover with foil and bake for 30 minutes. Remove foil and bake an additional 15–25 minutes, until potatoes are tender and the top is bubbly and lightly golden.
While the casserole bakes, whisk all burger sauce ingredients together in a small bowl until smooth. Taste and adjust seasoning as needed. Chill briefly if desired.
Let rest 5–10 minutes. Drizzle with burger sauce and add optional toppings before serving.