Line two baking sheets with parchment paper or silicone baking mats and set aside.
Add the granulated sugar, corn syrup, and peanut butter to a large saucepan. Place over medium heat and cook, stirring frequently, until the mixture comes to a gentle boil.
Continue boiling for 2 minutes, stirring often to prevent scorching. Remove the saucepan from the heat and immediately stir in the vanilla extract.
Add the cornflake cereal and gently fold until all of the cereal is evenly coated with the peanut butter mixture.
Using a cookie scoop or two spoons, drop portions of the mixture onto the prepared baking sheets.
Allow the cookies to cool and set at room temperature for 1 to 2 hours, or until firm.
Serve immediately or store in an airtight container.
Notes
Use conventional creamy peanut butter for the most reliable results. Natural peanut butter can make the cookies oily and prevent them from setting properly.
Have the cornflakes measured and ready before you begin cooking. The mixture firms up quickly once removed from the heat. Fold gently to keep the cornflakes from breaking and maintain their crisp texture.
Humid weather can affect how well no-bake cookies set. They may require a slightly longer cooling time.
Store in an airtight container at room temperature for up to 5 days.
Freeze in a freezer-safe container for up to 2 months. Thaw at room temperature before serving.