Place a small pot on low heat then add butter. Add garlic to the melted butter and sauté for 30 seconds.
Then add flour and mix well to combine. Cook for 2 minutes then add milk. Let it cook for 3-5 minutes until the sauce has thickened.
Now stir in salt, cayenne pepper, and 1 cup of grated cheese. Remove from the heat when the cheese is melted.
Brush an 8 x 8 baking dish with butter. Spread a layer of half of the thinly sliced potatoes, then top with half thyme leaves and cheese sauce.
Spread the second layer of the remaining potatoes, top with thyme leaves, and cheese sauce.
Sprinkle remaining ½ cup grated cheese on the top and cover the dish with foil. Place into a preheated oven (350 degrees) and bake for about 1 hour.
Check the potatoes by inserting a fork. If they are tender, remove the foil and cook for 20-25 minutes or until golden brown.
Your Scalloped Potatoes are ready! Cool before serving.