Preheat your oven to 190°C (375°F) and grease a baking dish with butter.
Melt butter in a saucepan over low heat, then add garlic and cook until fragrant.
Pour in the cream and season with salt and pepper; let it warm gently.
Arrange a single layer of potato slices in the dish, then pour a bit of the cream mixture on top.
Sprinkle cheddar cheese, then repeat the layers until all the potatoes are used.
Finish with Parmesan cheese on top.
Bake for about 45–50 minutes until the top turns golden and the potatoes are tender.
Let it rest for 10 minutes before serving; it thickens as it cools.