Peel the Yukon Gold potatoes and thinly slice them with a sharp knife or mandolin. You want them to be roughly ¼-inch thick.
Peel and finely dice the onion and set aside.
Arrange half of the sliced potatoes on the bottom of the prepared baking dish. Top with half flour, half the salt and pepper, half the shredded cheddar cheese, and half of the onion. Dot with half of the butter. Repeat these layers one more time.
In a medium saucepan, heat the milk until warm to the touch. Then, pour the milk over the prepared potatoes.
Cover the baking dish tightly with foil, and bake for approximately 45 minutes or until the potatoes are hot and bubbly. Then, uncover and bake for an additional 15 minutes or until the cheese is lightly browned.
Remove from the oven and let the scalloped potatoes rest for 5 to 8 minutes to allow the sauce to thicken.
Garnish with parsley and serve with your favorite main dish.