Make the dough. In a large bowl, whisk flour, sugar, and salt. Cut in the cold butter with a pastry cutter or your fingertips until pea-sized bits remain.
Drizzle in ice water, tossing with a fork until the dough holds together when pinched. Divide into two disks, wrap, and chill for at least 1 hour.
Prep the apples. Peel, core, and slice apples about 1/4-inch thick. In a large bowl, toss with lemon juice, both sugars, cinnamon, nutmeg, allspice (if using), salt, cornstarch, and vanilla.
Let sit 10–15 minutes to start releasing juices.
Roll the bottom crust. On a lightly floured surface, roll one dough disk into a 12-inch circle. Fit it into a 9-inch pie plate, letting excess hang over the edge. Chill the lined pie plate while you roll the top crust.
Fill the pie. Spoon the apple mixture into the crust, mounding slightly in the center.
Pour any juices over the apples. Dot with the small pieces of butter.
Add the top crust. Roll the second dough disk into another 12-inch circle. Lay it over the filling.
Trim excess dough, leaving about 1 inch overhang. Fold edges under and crimp. Cut a few slits on top for steam, or make a lattice if you like.
Chill the assembled pie. Place the pie in the fridge for 20–30 minutes.
This helps the crust hold its shape and improves flakiness.
Preheat and egg wash. Heat the oven to 425°F (220°C). Brush the top with egg wash and sprinkle with coarse sugar if using.
Bake hot, then lower the temperature. Bake at 425°F for 20 minutes. Reduce to 375°F (190°C) and bake another 35–45 minutes, until the crust is deep golden and the filling bubbles at the vents.
Cool before slicing. Let the pie cool on a rack at least 3–4 hours.
The filling sets as it cools, giving you neat slices.
Serve. Enjoy slightly warm or at room temperature. It’s great plain, with whipped cream, or with a scoop of vanilla ice cream.