In a bowl, whisk flour, sugar, and salt. Add cold butter and blend with a cutter or your fingers until crumbly.
Slowly add ¼ cup cold water until dough forms. Shape into a disk, wrap, and chill for 1 hour.
Preheat oven to 400°F (200°C). Line a baking sheet with parchment.
Roll dough on a floured surface to ¼-inch thick. Cut into 4×4-inch squares.
Beat cream cheese, powdered sugar, and vanilla until smooth.
Place 1 Tbsp filling in center of each square. Fold corners to the center and pinch to seal.
Mix egg and milk. Brush over the top and sides of each pastry.
Place on baking sheet and bake 15–20 minutes until golden.
Let them rest a few minutes before serving warm.