Preheat the Oven. Preheat your oven to 400°F (200°C).
Prepare the Puff Pastry. Roll out the puff pastry on a lightly floured surface to fit a 9-inch tart pan with a removable bottom.
Press the pastry into the tart pan, trimming any excess. Prick the bottom of the pastry with a fork to prevent it from puffing up during baking.
Blind Bake the Pastry. Line the pastry with parchment paper and fill with pie weights or dried beans.
Bake in the preheated oven for 10 minutes, then remove the parchment paper and weights and bake for an additional 5 minutes until lightly golden. Remove from the oven and set aside.
Prepare the Filling. In a large skillet, heat the olive oil over medium heat.
Add the chopped onion and cook until softened, about 5 minutes.
Add the minced garlic and cook for another minute until fragrant.
Add the sliced mushrooms and thyme leaves, cooking until the mushrooms are tender and any liquid has evaporated, about 7-10 minutes.
Stir in the heavy cream and cook for another 2 minutes until slightly thickened. Season with salt and pepper to taste.
Assemble the Tart. Spread the mushroom mixture evenly over the pre-baked pastry crust.
Sprinkle the grated Edam cheese evenly over the top. Bake the Tart. Brush the edges of the puff pastry with the beaten egg.
Bake in the preheated oven for 15-20 minutes, or until the cheese is melted and bubbly, and the pastry is golden brown.
Serve: Remove the tart from the oven and let it cool slightly before slicing.
Serve warm or at room temperature, garnished with fresh thyme leaves if desired.