Prepare the Squash and Onion: Grate the yellow summer squash using a box grater or food processor, and finely chop the sweet onion. Place the grated squash in a clean kitchen towel and squeeze out as much excess moisture as possible to prevent the fritters from becoming soggy.
Make the Fritter Batter: In a large mixing bowl, combine the grated squash, chopped onion, flour, egg, sugar, and salt. Mix until all the ingredients are well combined and form a thick batter.
Heat the Oil: Heat about ¼ inch of vegetable oil in a large skillet over medium heat. Test it by dropping a small bit of batter into the oil; if it sizzles, the oil is ready.
Fry the Fritters: Using a spoon or your hands, form the batter into small patties (about 2 tablespoons each) and gently place them in the hot oil. Cook the fritters in small batches, ensuring the pan isn’t overcrowded. Fry for 3 to 4 minutes per side, or until they are golden brown and crispy.
Drain and Serve: After cooking the fritters, move them to a plate lined with paper towels to absorb any extra oil. Sprinkle with a little extra salt if desired, and serve warm.