In a bowl, mix sourdough discard, flour, and salt. Cut in butter until mixture is crumbly.
Chill dough for 30 minutes.
Roll dough into a rectangle, fold, and repeat 2–3 times to create layers.
In another bowl, mix cream cheese and powdered sugar until smooth.
Roll dough again and cut into squares. Add cream cheese and raspberries to the center.
Fold corners inward or twist edges to shape.
Let pastries rest for 20–30 minutes while preheating oven.
Brush with egg wash if desired.
Bake at 400°F (200°C) for 18–22 minutes until golden.
Cool slightly and serve warm. Enjoy your Sourdough Discard Raspberry Cream Cheese Danish fresh.