Preheat Oven
Preheat oven to 375°F (190°C).
Lightly grease a 9x13-inch baking dish with olive oil.
Prepare Potatoes
Slice potatoes evenly to about ⅛-inch thick.
Thinly slice onion and mince garlic.
Do not rinse potatoes after slicing—the starch helps thicken the sauce.
Make the Creamy Sauce
Add soaked cashews, plant-based milk, nutritional yeast, lemon juice, salt, pepper, thyme, and nutmeg to a high-speed blender.
Blend until completely smooth and creamy.
Taste and adjust seasoning if needed.
Sauce should be silky and pourable.
Assemble the Gratin
Layer half of the potatoes in the baking dish.
Sprinkle with half the onion and garlic.
Pour half the sauce evenly over the top.
Repeat with remaining potatoes, onion, garlic, and sauce.
Gently press down so sauce settles between layers.
Bake
Cover tightly with foil.
Bake for 45 minutes.
Remove foil and bake an additional 20–25 minutes until top is golden and potatoes are fork-tender.
Optional: Broil 2–3 minutes for extra browning.
Rest
Let rest 10–15 minutes before serving to allow sauce to thicken.