01 - Cut cold butter into flour using a pastry blender or fingertips until mixture resembles coarse crumbs. Incorporate sourdough discard, sugar, and salt, mixing until dough just comes together. Form into a disk, wrap tightly in plastic wrap, and refrigerate for minimum 1 hour.
02 - Beat softened cream cheese in medium bowl until completely smooth and lump-free. Whisk in granulated sugar, vanilla extract, and lemon juice until fully incorporated and creamy. Cover and refrigerate until ready to use.
03 - Combine raspberries, granulated sugar, cornstarch, and lemon juice in small saucepan. Cook over medium heat, stirring constantly, until mixture thickens and bubbles, 3 to 5 minutes. Remove from heat and cool completely before using.
04 - Preheat oven to 375°F and line baking sheet with parchment paper. On lightly floured surface, roll chilled dough to 1/4-inch thickness. Cut into 8 equal rectangles or circles. Arrange 2 inches apart on prepared baking sheet. Press center of each piece with thumb or spoon to create indentation. Fill each with approximately 1 tablespoon cream cheese mixture, followed by raspberry filling.
05 - Let assembled pastries rest at room temperature for 20 to 30 minutes until slightly puffed. Brush edges with beaten egg for golden finish. Bake until deep golden brown and filling is set, 20 to 25 minutes. Cool on baking sheet for 5 minutes before transferring to wire rack.
06 - Whisk powdered sugar, milk, and vanilla extract in small bowl until smooth and drizzling consistency. Adjust liquid as needed. Drizzle glaze generously over cooled danishes and serve immediately or store in airtight container.