Step 1: Make the Pie Crust : In a large bowl, combine flour, salt, and sugar. Add cold butter cubes and use a pastry cutter (or your fingers) to cut the butter into the flour until the mixture resembles coarse crumbs. Add ice water, one tablespoon at a time, mixing until dough just comes together. Divide dough into two discs, wrap in plastic wrap, and refrigerate for at least 1 hour.
Step 2: Prepare the Apple Filling : In a large bowl, combine sliced apples, sugars, flour, cinnamon, nutmeg, allspice, salt, lemon juice, and vanilla. Toss well to coat evenly and let sit for 10–15 minutes to allow the flavors to meld.
Step 3: Assemble the Pie : Preheat oven to 400°F (200°C). On a floured surface, roll out one disc of dough to fit a 9-inch pie pan. Place crust in the pan and trim excess dough hanging over the sides. Spoon apple mixture into the crust and dot with small butter pieces. Roll out the second dough disc and place over the filling (or cut strips to make a lattice top). Trim and crimp the edges to seal. Brush with egg wash and sprinkle with coarse sugar if desired.
Step 4: Bake : Bake at 400°F (200°C) for 20 minutes, then reduce heat to 375°F (190°C). Bake for an additional 30–40 minutes, until the crust is golden and the filling is bubbly. If edges brown too quickly, cover them with aluminum foil.
Step 5: Cool : Let the pie cool for at least 2 hours before slicing. This allows the filling to set properly.