Heat oven to 400 degrees (F)
Spray a deep dish casserole dish with cooking spray and set aside.
Melt butter in a large pan over medium heat. Add onion and saute' for about 5 mins. Onions should look clear.
Add garlic and continue to saute' for another 1-2 minutes.
Stir in the flour until it is evenly combined and cook for 1 more minute.
Gradually add the chicken broth and whisk until combined.
Next, add in milk, thyme, salt, pepper and continue to whisk until well combined.
Continue cooking for another 1-2 minutes until the sauce begins to simmer but do not boil. When the sauce begins to simmer around the edges of the pan, remove from heat. Set aside.
Put the first layer of the sliced potatoes in the bottom of the casserole dish.
Top the potatoes with a layer of cream sauce.
Add a layer of sharp cheddar cheese and parmesan cheese.
Continue layering in that order until you have used all of the potatoes, cream sauce, and cheese.
Cover potatoes with aluminum foil and bake in oven for 30 mins.
Remove the foil and bake uncovered for 25-30 minutes or until the potatoes are cooked though and soft.
Remove from oven and sprinkle with remaining thyme and any extra Parmesan cheese if you like.
Enjoy!