Boil the diced potatoes in salted water until tender, then drain and transfer to a large bowl.
Melt 1/2 cup butter in a skillet, add minced onion and sauté until soft, about 5-6 minutes.
Pour the butter and onion mixture over the potatoes, add shredded cheese, and mash until cheesy and combined. Season with salt and pepper. Let cool.
In a large bowl, mix flour, salt, and baking powder. Whisk egg and olive oil together, then add to flour mixture.
Gradually add warm water, one cup at a time, and mix with hands until dough forms. Knead 2-3 minutes until dough pulls away from hands.
Flour a clean surface and divide the dough into two balls. Roll one ball to 1/4 inch thickness and cut into 3-inch circles.
Repeat rolling and cutting with the second ball of dough until about 24 circles are made.
Stretch a dough circle slightly, place a spoonful of potato filling in the center, fold like a taco, pinch edges, then seal by scalloping with a spoon's back. Repeat for all circles.
Bring a large pot of salted water to a boil. Drop 6 pierogi at a time and cook until they float, about 5 minutes. Remove and keep covered with a towel.
Melt 2 tablespoons butter in a skillet over medium heat. Fry pierogi in batches, 2-3 minutes on first side, then 1-2 minutes on second side until golden brown. Add butter as needed.
Serve pierogi drizzled with melted butter, sour cream, and chopped chives if desired.