In a small bowl, whisk together the egg and the sour cream until well combined. Set aside.
In a large mixing bowl, add the flour and the salt and whisk to combine. Add the butter and use your fingertips to coat it in the flour. Rub the butter into the flour until it's incorporated and no large pieces of butter remain.
Make a well in the flour and add the sour cream mixture. Use a wooden spoon or flexible spatula to combine until a shaggy dough forms. Turn out the dough onto a clean work surface and knead gently until it comes together, is soft and lightly tacky - about 3 minutes (see note 2). Cover with plastic and refrigerate for at least 60 minutes and up to 48 hours.
While the dough is resting, making the filling. Add the porcini mushrooms to a heatproof bowl and over with 250ml (1 cup) of boiling water. Cover the bowl and allow the mushrooms to rehydrate for 15 minutes.
Meanwhile, add 25g (2 tbsp) of the butter along with 1 tbsp of neutral oil to a large skillet. Set over medium heat. Once the butter is melted and foamy, add the chopped fresh mushrooms along with a generous pinch of salt. Cook, stirring every so often, until the mushrooms have reduced in size and are deeply browned, about 7-10 minutes.
Add the onions and cook, stirring occasionally, until softened - about 5 minutes.
Once the porcini mushrooms are rehydrated, remove them from the liquid (reserve the liquid) and roughly chop. Add the porcinis, reserved soaking liquid and the sauerkraut to the pan. Stir to combine and bring to a simmer. Continue simmering until the liquid is reduce - about 3 more minutes. Taste to adjust for seasoning, adding salt and pepper where needed, and remove from the heat.
When ready to assemble, lightly dust a work surface with flour. Unwrap the rested dough and, using a rolling pin, roll out the dough in a circle until it's about 3mm (⅛ in) thick and it has a diameter of around 50cm (20in). Use an 8cm (3in) circular cutter (or a drinking glass) to punch out roughly 28 rounds from the dough (see note 3).
Spoon about 1 tablespoon of mushroom filling into the centre of the dough round. Fold the dough over the filling and crimp tightly to seal. Move to a parchment-lined baking tray and repeat with all remaining dough and filling (see note 4).
Bring a large pot of water to a rolling boil. Add half of the pierogi and cook, stirring to prevent sticking, until they float to the top of the pot - about 2-3 minutes.
While the dumplings are cooking, add the remaining 25g (2 tbsp) of butter to a large skillet. Set over medium-high heat and melt until bubbling and foaming. Once the pierogi are done boiling, transfer immediately from the water to the skillet. Cook on one side until golden and lightly crisp - about 1-2 minutes, before flipping and cooking on the other side. Transfer to a serving plate and top with sour cream. Serve immediately.
Notes
Use the weight measurement rather than the volumetric measurement if possible as different varieties and types of salt can vary in volume.
Avoid adding any additional flour when kneading the dough unless it's unmanageably sticky.
Any scraps can be regathered and kneaded into a cohesive ball. Cover with plastic and wait about 15-30 minutes before re-rolling out and cutting more dough circles. I don't recommend doing this more than once.
The raw, filled dumplings can be frozen solid on the baking tray. Once frozen, move to an airtight container or a freezer bag and keep in the freezer for up to 3 months. You can cook the pierogi directly from frozen, just not they will take 1-2 minutes longer.