01 - Preheat oven to 400°F. Line a baking sheet with parchment paper and set aside.
02 - Melt butter in a skillet over medium heat. Add diced apples, brown sugar, cinnamon, nutmeg, and lemon juice. Cook for 6 to 8 minutes, stirring frequently, until apples are tender and coated in a thick syrup. Remove from heat and allow to cool completely.
03 - In a mixing bowl, beat softened cream cheese with granulated sugar and vanilla extract until smooth and creamy. Set aside.
04 - Unfold thawed puff pastry onto a lightly floured surface and roll gently to smooth creases. Cut into 8 equal squares. Transfer squares to the prepared baking sheet. Using a sharp knife, lightly score a smaller square border inside each piece about 1/2 inch from the edge, being careful not to cut through the dough. Prick the inner square several times with a fork.
05 - Spread approximately one tablespoon of cream cheese filling onto the center of each pastry square, staying within the scored border. Spoon a generous portion of cooled apple filling over the cream cheese layer.
06 - Brush the exposed pastry edges with beaten egg to promote even browning during baking.
07 - Bake on the center rack for 18 to 22 minutes, rotating the tray halfway through, until pastry is deeply golden and puffed. Transfer to a wire cooling rack.
08 - Allow danishes to cool slightly. Whisk powdered sugar with milk or lemon juice until a drizzle consistency is reached. Use a spoon to zigzag the glaze over each danish. Serve warm or at room temperature.