If using fresh corn, cut kernels from the cobs to make 2 cups and set aside.
In a large bowl, whisk together the flour, baking powder, sugar, salt, and black pepper until evenly combined.
In a second bowl, whisk the eggs and milk until smooth, then pour into the dry ingredients and stir just until a thick batter forms.
Fold the corn kernels into the batter until evenly distributed; do not overmix.
Heat the vegetable oil in a large skillet over medium to medium-high heat until shimmering (about 350°F/175°C).
Working in batches, drop heaping tablespoonfuls of batter into the hot oil, flattening slightly with the back of the spoon. Fry until deep golden brown on the first side, 2–3 minutes; flip and cook 2–3 minutes more until the centers are set and the edges are crisp.
Transfer fritters to a paper towel–lined plate to drain. Repeat with remaining batter, adjusting heat to maintain oil temperature. Serve hot.