Preheat Oven
Start by preheating your oven to 375°F (190°C).
Prepare the Cream Mixture
In a saucepan, combine heavy cream, milk, garlic, and onion. Bring to a simmer, then remove from heat. Stir in salt, pepper, and nutmeg.
Layer the Potatoes
In a well-greased baking dish, layer half of the potato slices, overlapping them slightly. Sprinkle half of the cheese over the potatoes.
Add the Cream Mixture
Pour half of the cream mixture over the first layer of potatoes and cheese.
Repeat the Layers
Repeat the process with the remaining potatoes, cheese, and cream mixture.
Bake
Cover the dish with aluminum foil and bake for 40 minutes. Afterward, remove the foil and bake for another 20-30 minutes or until the top is golden and bubbly.
Garnish and Serve
Let the gratin sit for 10 minutes before serving. Garnish with fresh thyme or parsley to enhance the flavor and add a touch of color.