Prepare the Potatoes
Peel the potatoes if desired, then slice evenly into ⅛- to ¼-inch thick rounds.
Make the Cheese Sauce
In a medium saucepan over medium heat, melt the butter.
Add the chopped onions and cook for about 3 minutes, until softened.
Stir in garlic and thyme; cook for 1 minute more.
Sprinkle in the flour and stir to form a paste.
Gradually pour in the heavy cream while stirring constantly to avoid lumps.
Season with salt, pepper, thyme, and cayenne (if using).
Stir in 2 cups of shredded cheddar cheese until fully melted and smooth. Remove from heat.
Assemble the Dish
Preheat oven to 375°F (190°C). Grease a 9x13-inch baking dish.
Layer half the potato slices in the bottom of the dish.
Pour half the cheese sauce evenly over the potatoes.
Sprinkle half of the remaining cheese over the sauce.
Repeat with remaining potatoes, cheese sauce, and cheese.
Garnish with chopped chives, thyme, or parsley if desired.
Bake the Potatoes
Cover with foil and bake for 40 minutes.
Remove foil, sprinkle remaining cheese on top, and bake uncovered for another 20 minutes until golden and bubbly.
Serve & Enjoy
Let rest for a few minutes before serving.
Garnish with extra chives, parsley, or thyme if desired.
Notes
For extra creaminess: Replace half of the heavy cream with whole milk.
Add protein: Mix in cooked bacon or ham between the potato layers.
Make ahead: Assemble the dish up to 24 hours ahead and refrigerate. Bake just before serving.