Preheat oven to 180°C (350°F).
Lightly cook potatoes in boiling water for 5 minutes (optional for faster baking).
Sauté onion and garlic in butter, then add spinach and cook until wilted.
Layer potatoes and spinach mixture in a greased baking dish.
Pour cream over, season, and top with cheese.
Bake for 30–35 minutes until golden and bubbly.
