Grate the potatoes and squeeze out excess moisture using a clean kitchen towel or paper towels.
In a mixing bowl, combine the grated potatoes, onion, flour, egg, chili flakes (if using), black pepper, and salt. Mix well until all ingredients are evenly incorporated.
Heat the vegetable oil in a frying pan over medium heat.
Take small portions of the potato mixture and shape them into flat, round patties.
Carefully place them into the hot oil and fry for 3-4 minutes per side, or until golden brown and crispy.
Remove from the pan and drain on a paper towel to remove excess oil.
Serve hot with your favorite dipping sauce, such as sour cream, garlic yogurt, or spicy ketchup.