In a large bowl, combine flour and salt.
Create a well in the center, add the egg, and mix gently.
Gradually add water, mixing until a dough forms.
Knead the dough on a floured surface for about 5 minutes.
Cover the dough with a towel and let it rest for 15 minutes.
In a skillet, melt butter and sauté the chopped onion until golden.
In a bowl, mix mashed potatoes, cottage cheese, and sautéed onions.
Roll out the dough and cut into circles using a glass.
Place a spoonful of filling in the center of each circle.
Fold and seal the edges, ensuring no filling escapes.
Boil a large pot of salted water, and cook the pierogi until they float (about 5 minutes).
Serve warm with a dollop of sour cream and garnish with herbs.