Cory catfish swim to the top because they need to breathe. Cory catfish often come to the water surface to gulp air with their mouths.
While this is a natural cory behavior, if your cory does this often, it’s because there isn’t enough dissolved oxygen in the water. If this is happening, you need to install a bubbler or an air pump in your tank.
If you notice your cory catfish gasping rapidly as they swim to the top, they might be stressed or sick. Immediately check the water conditions to see if anything is off. If your cory exhibits additional symptoms, contact a veterinarian.