Preheat the oven to 400°F (200°C) and lightly grease a baking dish. In a large saucepan, melt the butter over medium heat. Add the garlic and cook for about 1 minute until fragrant.
Stir in the flour and cook for 1–2 minutes to make a roux.
Gradually whisk in the cream and cook 1–2 minutes until slightly thickened. Add Parmesan, thyme, salt, and pepper, whisking until smooth. Adjust thickness by adding a little milk if needed.
Arrange the potato slices vertically in the baking dish. Pour the sauce over the potatoes and sprinkle more Parmesan on top if you like.
Cover with foil and bake for 30 minutes. Remove the foil and bake for another 30 minutes until the potatoes are tender and the top is golden.
Let the potatoes rest for 10 minutes before serving.