01 - Cut cold butter into flour in a large bowl until mixture resembles coarse crumbs. Incorporate sourdough discard, sugar, and salt until soft dough forms. Shape into a disk, wrap in plastic wrap, and refrigerate for minimum 1 hour.
02 - Beat softened cream cheese in medium bowl until completely smooth. Add granulated sugar, vanilla extract, and lemon juice; continue mixing until creamy and fully incorporated. Reserve at room temperature.
03 - Combine raspberries, sugar, cornstarch, and lemon juice in small saucepan. Cook over medium heat, stirring continuously, until mixture thickens and coats spoon, approximately 3-5 minutes. Remove from heat and allow to cool completely.
04 - Preheat oven to 375°F and line baking sheet with parchment paper. Roll chilled dough on lightly floured surface to 1/4-inch thickness. Cut into 8 rectangles or circles. Arrange 2 inches apart on prepared baking sheet. Create indentation in center of each piece using fingers or spoon back. Place 1 tablespoon cream cheese filling in each center, top with raspberry filling.
05 - Let assembled pastries rest at room temperature for 20-30 minutes until slightly puffed. Brush edges lightly with beaten egg. Bake for 20-25 minutes until golden brown and filling is set. Transfer to wire rack to cool completely.
06 - Whisk powdered sugar, milk, and vanilla extract until smooth consistency forms. Drizzle glaze over cooled danishes immediately before serving.