1. Peel the onion and finely chop it. Rinse the spinach and drain well. Cut the salmon into thin slices.
2. Heat the olive oil in a pan and add the onion and spinach. Cook while stirring often until the spinach has wilted and the water has evaporated. Set aside.
3. Preheat the oven to 350 °F.
4. Roll out one puff pastry sheet in a pie dish and prick the bottom with a fork. Fill the bottom with half of the spinach. Arrange the salmon slices on top, followed by the cream, and then the remaining spinach.
5. Fold the edges of the puff pastry inward by about 1 cm. Beat the egg yolk in a bowl with a fork and brush it onto the folded edge using a pastry brush. Cover the entire pie with the second puff pastry sheet, making sure to tuck the edges inside the dish.
6. Brush the top with the remaining egg. Make a small hole in the center of the pie using a knife.
7. Bake at 350 °F for about 30 to 35 minutes.