In a medium mixing bowl, whisk together the flour, sugar, and salt.
Cut the cold butter into tablespoons and add it to the dry ingredients. Using a pastry blender, cut the butter into the flour mixture until the butter is in pea-size pieces.
Add 6 tablespoons of ice cold water and mix with a fork until combined. If the dough is too dry, continue adding water 1 tablespoon at a time until the crust comes together and looks clumpy. The dough should be shaggy and slightly dry, not wet.
Turn the mixture onto a lightly floured surface. Fold the dough into itself, kneading lightly, until it comes together. Form the dough into a ball and divide it into two equal pieces.
Pat each piece into a flat disc, wrap tightly in plastic wrap, and refrigerate for at least 2 hours.
On a lightly floured surface, roll one dough disc into a 13-inch circle. Place it into a 9-inch pie dish and gently press it into the bottom and sides. Add your desired pie filling.
Roll the second dough disc into a circle about 12 inches wide. Use a pizza cutter or sharp knife to cut the dough into long strips, about ½ to 1 inch wide.
Lay half of the dough strips vertically over the pie filling, spacing them evenly apart.
Fold back every other vertical strip halfway. Place one horizontal strip across the unfolded strips, then lay the folded strips back over it.
Fold back the opposite vertical strips, then place another horizontal strip next to the first. Continue folding and layering strips until a lattice pattern covers the pie.
Trim any excess dough from the edges of the pie dish. Press the lattice strips and bottom crust together to seal, then crimp the edges with your fingers.
In a small bowl, whisk together the egg and 1 tablespoon water or milk. Brush the egg wash over the lattice crust. Sprinkle with coarse sugar, if desired.
Bake according to your pie filling recipe, or until the filling is bubbling and the crust is golden brown.