Preheat the oven to 225°C for the mushrooms with curd filling. Grease a gratin dish with butter. Rub the mushrooms with a damp cloth, clean them, turn out the stems and chop them. Peel the onion and garlic and chop them as well. Now cut the ham into small cubes. Heat oil in a pan, fry the mushroom heads briefly in it and remove immediately.
Then in the pan roast the chopped mushroom stems, onion and ham, season with garlic, herbs, salt and pepper and then stir in the curd. Place the mushroom heads in the gratin dish and fill with the curd mixture.
Then whip the cream with the egg yolk and spread on the curd mixture. Sprinkle with cheese and put butter flakes on the mushrooms. Bake the mushrooms with curd filling in the oven for about 30 minutes until golden.