Collect all the necessary ingredients.
In a large skillet, heat 1 tablespoon of oil over medium heat. Add the chopped onion and sauté for about 5 minutes until it becomes translucent. Then, stir in the mushrooms and 1 teaspoon of garlic, cooking for another 5 minutes until the mushrooms soften. Season with salt and black pepper, then transfer the mixture to a small bowl.
In the same skillet, heat the remaining 1 tablespoon of oil. Add the remaining garlic and sauté for about 30 seconds until fragrant. Stir in the spinach and cook for 3 to 5 minutes, or until wilted. Season with salt and black pepper, then transfer the mixture to a separate bowl.
Preheat the oven to 350°F (175°C). Prepare a glass baking dish by lining it with parchment paper.
Lightly flour your work surface and place one sheet of puff pastry on it. Evenly spread the onion and mushroom mixture over the pastry, leaving a half-inch border. Place the salmon in the center, sprinkle with paprika, and layer the wilted spinach on top.
Place the second sheet of puff pastry over the filled one. Fold the edges to encase the salmon and crimp them to seal tightly. Brush the top with the beaten egg for a golden finish, then carefully transfer the wrapped pastry into the prepared baking dish.
Bake in the preheated oven for 40 to 45 minutes, or until the pastry turns golden brown. Allow it to cool slightly before slicing into four portions.
For the sauce, combine mayonnaise, lemon juice, Dijon mustard, and dill in a small bowl and whisk until smooth.
Place a spoonful of sauce on each of the 4 plates, then carefully arrange a portion of the salmon en croûte on top.