Shred potatoes using a box grater or food processor with shredding attachment.
Place shredded potatoes in a clean kitchen towel and squeeze out as much moisture as possible.
In a large bowl, mix the squeezed potatoes with finely chopped onion, flour, and egg until well combined.
Shape the mixture into 4-6 patties, pressing firmly to help them hold together.
Heat oil in a large skillet over medium heat until shimmering.
Carefully place patties in the hot oil and fry for 3-4 minutes per side until golden brown and crispy.
Transfer to paper towels to drain excess oil before serving.