In a large bowl, combine flour and salt.
Make a well in the center, then add the egg, softened butter, and sour cream.
Mix until a dough forms.
Transfer the dough onto a floured surface.
Knead the dough for about 4-5 minutes until it's smooth and elastic.
Wrap the dough in plastic wrap and rest for 30 minutes.
Roll out the dough to about 1/16-inch thickness.
Cut out circles using a cookie cutter or glass, approximately 3 inches in diameter.
Keep dough circles covered with a cloth to prevent drying out.
Fill each circle with a spoonful of mashed potatoes and cheese filling.
Fold the dough over and seal the edges by pressing with a fork.
Bring a pot of salted water to a boil.
Cook pierogi in batches for 3-4 minutes or until they float to the top.
Remove with a slotted spoon and let drain.
Serve the pierogi warm with a side of sour cream or butter.