Preheat Oven: Preheat your oven to 375°F (190°C). Grease a 9x13-inch baking dish or a similar-sized casserole dish.
Prepare the Cream Sauce: In a saucepan, melt the butter over medium heat. Stir in the flour and cook for 1-2 minutes until bubbly. Gradually whisk in the heavy cream, garlic powder, salt, and black pepper. Continue to cook until the sauce thickens, about 3-5 minutes. Remove from heat and stir in the shredded cheddar cheese until melted and smooth.
Layer the Potatoes: Arrange half of the sliced potatoes in the prepared baking dish. Sprinkle half of the chopped onion over the potatoes, followed by half of the cheese sauce. Repeat with the remaining potatoes, onions, and cheese sauce.
Add Parmesan: Sprinkle the grated Parmesan cheese evenly over the top of the casserole.
Bake: Cover the baking dish with aluminum foil and bake in the preheated oven for 45 minutes. Remove the foil and bake for an additional 15-20 minutes, or until the potatoes are tender and the top is golden brown and bubbly.
Cool and Serve: Allow the cheesy scalloped potatoes to cool for a few minutes before serving. Garnish with fresh parsley if desired.