01 - Preheat oven to 350°F. Grease a 9x13-inch baking dish with butter.
02 - Melt butter in a medium saucepan over medium heat. Add garlic and onion; sauté until softened, about 3 to 4 minutes.
03 - Stir in milk, heavy cream, salt, black pepper, and nutmeg. Heat until steaming without boiling, then remove from heat.
04 - Arrange half of the potato slices evenly in the prepared dish, slightly overlapping.
05 - Pour half of the cream mixture over the potatoes and sprinkle with 1 cup of cheese.
06 - Layer remaining potatoes on top, pour remaining cream mixture, then top with remaining cheese.
07 - Cover with aluminum foil and bake for 45 minutes.
08 - Remove foil and continue baking 25 to 30 minutes until golden, bubbling, and fork-tender.
09 - Allow to rest for 10 minutes before serving.