In a mixing bowl, combine flour, sugar, and salt.
Add cold butter and use a pastry cutter or your fingers to cut it into the flour until the mixture resembles coarse crumbs.
Stir in sourdough discard.
Add cold water 1 tablespoon at a time until dough holds together but isn’t sticky.
Form into a disc, wrap in plastic, and chill for at least 30 minutes.
If using a runny jam, mix it with cornstarch to thicken. Set aside.
Preheat oven to 375°F (190°C). Line a baking sheet with parchment paper.
Roll out chilled dough on a lightly floured surface to about ⅛ inch thick.
Cut into rectangles (approx. 3×4 inches). You’ll need an even number—about 16 pieces.
Spoon 1–1½ tablespoons of filling into the center of half the rectangles, leaving a ½-inch border.
Brush edges with egg wash, then top with remaining rectangles. Press edges with a fork to seal.
Poke a few holes in the top with a fork or toothpick to allow steam to escape.
Brush tops with egg wash.
Bake for 22–25 minutes or until golden brown.
Let cool on a wire rack.
Mix powdered sugar, milk, and vanilla until smooth. Drizzle over cooled pop tarts and add sprinkles if desired.
