Preheat the oven to 350°F (175°C) and grease a 9x13-inch baking dish.
Peel and thinly slice the russet potatoes, using a mandoline or sharp knife.
In a large saucepan, melt the butter over medium heat and sauté the garlic for 30 seconds. Add the heavy cream and bring to a simmer.
Stir in the shredded cheddar and grated Parmesan, whisking until melted and smooth. Season with salt and pepper.
Layer half of the potato slices in the baking dish, pour half of the cheese sauce over them, and repeat with the remaining potatoes and sauce.
Cover with foil and bake for 45 minutes. Remove the foil and bake for another 15-20 minutes, or until golden and bubbly.
Let rest for 10 minutes before serving.