Preheat your oven to 400°F (200°C). Line a baking sheet with parchment paper.
Roll out the puff pastry on a lightly floured surface. Score a 1-inch border around the edges without cutting all the way through.
Mix the softened cream cheese with dill, lemon zest, garlic, salt, and pepper until well combined.
Spread the cream cheese mixture evenly within the scored border of the pastry.
Arrange the asparagus spears in a single layer over the cream cheese mixture.
Brush the asparagus with olive oil and season with salt and pepper.
Brush the pastry border with beaten egg.
Bake for 20-25 minutes, or until the pastry is golden brown and the asparagus is tender.
Let cool for 5 minutes, then layer the smoked salmon over the asparagus.
Garnish with extra dill, capers, and thinly sliced red onion if desired.