In a large bowl, combine 3 cups all purpose flour and 1 teaspoon salt.
Add 1 large egg, ¾ cup sour cream, and ¼ cup melted unsalted butter. Mix until a soft dough forms.
Turn the dough out onto a lightly floured surface and knead for 5 to 7 minutes until smooth. Cover and let it rest for 20 minutes.
In a bowl, mix together 2 cups mashed potatoes, 1 cup shredded cheddar cheese, ½ teaspoon salt, and ½ teaspoon black pepper until well combined.
Roll the dough out on a floured surface to about ⅛ inch thickness.
Cut circles using a 3 inch cutter or glass.
Place about 1 tablespoon of the potato and cheese filling in the center of each circle.
Fold the dough over to form a half moon and pinch the edges firmly to seal.
Bring a large pot of salted water to a boil.
Add the pierogi in batches and cook for 3 to 4 minutes, until they float to the surface. Remove with a slotted spoon.
Heat 2 tablespoons butter in a large skillet over medium heat. Add the chopped onion and cook for 5 to 7 minutes until golden.
Add the boiled pierogi to the skillet and cook for 3 to 4 minutes per side until lightly browned.
Serve warm with the sautéed onions.