Add the peeled potatoes to a large pot, cover with cold water, and bring to a simmer over medium-high heat. Reduce the heat to medium, partially cover, and simmer until the potatoes are tender and easily pierced with a skewer.
Drain the potatoes and let them cool just enough to handle. Cut them in half and mash them in a large bowl. Allow to cool until almost at room temperature (about 20 minutes).
Lightly flour a work surface. In a small bowl, mix the flour and salt together. Add the egg (or vegan alternative) to the potatoes, then mix in the flour mixture. Use your hands to bring the dough together until just combined. It should be soft, smooth, and slightly sticky.
Knead gently to fully incorporate the flour but do not overmix—this will make the gnocchi tough.
Roll the dough into long, thin “snakes” on a floured surface. Cut into bite-sized 13mm (½ inch) pieces.
Arrange the gnocchi on parchment-lined baking sheets, ensuring they don’t touch. Sprinkle with a little more flour to prevent sticking.
Gnocchi can be cooked immediately, frozen for later, or left out for up to two hours before cooking.