In a bowl, whisk together the flour, cocoa powder, powdered sugar, and a pinch of salt.
Add the cold butter cubes. Use a pastry cutter or your fingers to work the butter into the dry mix until the pieces are about the size of small peas.
Beat the vanilla and egg lightly in a small bowl. Pour it into the mixture and stir gently until the dough just comes together. Avoid overworking the dough. If the dough is crumbly, add 1 teaspoon of ice-cold water at a time until it comes together.
Shape the dough into a round disk, wrap it in plastic wrap, and chill in the refrigerator for at least 1 hour.
On a lightly floured surface, roll out the chilled dough until it is about 1/8 inch thick. Transfer the dough to a greased 9-inch pie pan and press it gently into the bottom and up the sides. Prick the base with a fork.
Preheat your oven to 375°F and bake the crust for 20 minutes, lined with parchment paper and with pie weights. Then remove the weights and bake for an additional 5-10 minutes, depending on whether you want it par-baked or fully baked. Let the crust cool before adding your pie filling.