Preheat your oven to 375°F (190°C) and place the puff pastry sheet in a quiche or pie dish, pressing it into the corners and trimming any excess.
Heat the olive oil in a skillet over medium heat.
Add the chopped onion and sauté for 5 minutes until it softens.
Add the sliced mushrooms to the skillet.
Cook with the onion until the mushrooms release their liquid and turn golden, about 8 minutes.
In a mixing bowl, whisk together the eggs, heavy cream, salt, and black pepper.
Add the sautéed mushrooms and onions to the egg mixture.
Pour the mixture into the prepared puff pastry shell.
Sprinkle grated Gruyère cheese evenly on top.
Bake the quiche in the preheated oven for 30-35 minutes, or until the filling is set and the top is golden brown.
Let it cool for 10 minutes before serving.