To prepare these Cheesy Scalloped Potatoes, start by preheating the oven to 400°F and spraying a 9 x 13-inch baking dish with nonstick spray. In a large skillet over medium-high heat, melt the butter. Add the onion slices and sauté for 4-5 minutes until they turn translucent. Stir in the minced garlic and cook for another minute.
Add the flour, whisking to combine, and cook for an additional minute. Gradually whisk in the chicken broth and milk, ensuring no lumps remain. Season with salt, pepper, and half of the thyme. Cook for 1-2 minutes until the mixture starts to simmer (avoid boiling). Remove from heat.
Clean, dry, and slice the potatoes thinly, about 1/4 inch thick. Layer half of the sliced potatoes evenly in the prepared baking dish. Pour half of the sauce over the potatoes, then sprinkle with 1 cup of shredded cheddar and half of the grated Parmesan.
Repeat the layering process with the remaining potatoes and sauce. Top with the remaining Parmesan cheese, followed by the remaining shredded cheddar.
Cover the dish with aluminum foil and bake for 30 minutes. Remove the foil and bake uncovered for an additional 25-30 minutes, or until the potatoes are tender.
Once done, remove the pan from the oven, sprinkle with the remaining thyme or garnish with chives. Allow the dish to rest for 10 minutes before serving.