Preheat the oven to 350 F. Spray a 2-quart baking dish with cooking spray
Make the bechamel sauce: in a medium-sized saucepan, melt the butter over medium-high heat. Add the flour and cook it for about 1 minute
Whisk in the milk dissolving all lumps that may form. Simmer the sauce until thick, about 2 minutes. Season with paprika, powdered mustard, one teaspoon of salt, and ¼ teaspoon of pepper.
Remove from heat and add the shredded cheddar. Mix until melted and well combined
Place half the sliced potatoes in the bottom of the baking dish. Season with salt and pepper
Next, add half the sliced onions
Pour half of the sauce over the onions and potatoes. Repeat the layers with the remaining potatoes, onions, and sauce. Season with a little salt in between layers
Finish by sprinkling the Parmesan cheese evenly on top. Bake, covered with foil, for about 50 minutes. Remove the foil and bake for an additional 10-15 minutes or until the cheese is nicely browned and the potatoes tender