Set oven to 350°F (175°C). Grease a 9x13-inch baking dish.
Melt butter in a saucepan over medium heat. Add chopped onion and cook until softened. Stir in flour, garlic powder, salt, and pepper to create a roux.
Gradually whisk in milk. Cook until mixture thickens and begins to bubble.
Remove from heat and stir in shredded cheddar until smooth.
Arrange half the sliced potatoes in the baking dish. Pour half of the cheese sauce over them. Repeat with remaining potatoes and sauce.
Sprinkle Parmesan and paprika over the top. Cover with foil and bake for 45 minutes. Remove foil and bake an additional 30 minutes until golden and bubbly.
Allow dish to rest for 10 minutes before serving for best texture.