01 - Preheat oven to 400°F. Line a baking sheet with parchment paper.
02 - Melt butter in a small pan over medium heat. Add diced apple, brown sugar, cinnamon, and lemon juice. Cook, stirring, for 3–4 minutes until apples are soft and syrupy. Remove from heat and let cool.
03 - In a bowl, mix cream cheese, granulated sugar, and vanilla extract until smooth.
04 - Roll out puff pastry and cut into 8 equal squares.
05 - Place squares on prepared baking sheet. Score a border about 1/2 inch from the edge (do not cut through).
06 - Spread 1 tbsp cheese filling in the center of each square. Top with a spoonful of apple mixture.
07 - Brush edges with beaten egg.
08 - Bake 18–20 minutes or until pastries are golden and puffed.
09 - Cool for 10 minutes. Whisk powdered sugar with milk to form icing, then drizzle over danishes if desired.