Short answer: not strictly, but sand is the safest choice
When people ask do corydoras need sand substrate, the honest answer is no, not strictly. Many keepers keep them on gravel without trouble. Still, fine, smooth sand is the substrate most often recommended, because it is the least likely to harm the barbels the fish use to find food.
Why barbels matter
Corydoras have barbels, which are whisker-like sensory organs near the mouth. They use them to find food by touch as they sift the floor. Rough or sharp material can wear the barbels down, and a damaged barbel can become infected.
Most of the evidence on this comes from keeper reports rather than controlled studies, so the risk is real but hard to measure. Choosing smooth substrate is the simplest way to avoid it.
What to avoid
Sharp or jagged gravel is the main concern. Coarse blasting sand, a common black substrate, is also considered too rough for barbels by many keepers. Dirty substrate can be a problem as well, because waste collects in it and can irritate the fish.
Rounded gravel as an alternative
If you prefer gravel, choose smooth, rounded pieces rather than sharp chips. Keep the layer thin enough that the fish can sift without digging through a deep bed. For cories, a moderate layer is the usual choice, and the depth you want depends on the tank and the plants.
Keeping sand clean
Sand traps waste, so vacuum the surface gently during water changes to stop uneaten food and waste from building up. Keep the layer shallow enough that the sand stays loose and easy to clean. The same gentle approach used for how to vacuum aquarium gravel works for sand, with less suction so the sand does not get pulled into the siphon.
Rinse the sand before it goes in
New sand is often dusty, and the dust clouds the water. Rinse it well before adding it. The short answer to why is my aquarium water cloudy after adding sand is usually that fine dust, which rinsing prevents. If the cloud lasts longer than a day or two, it may be a bacterial bloom. Blooms often clear on their own over days to weeks, and how long does a bacterial bloom last in aquarium depends on the tank and how it is managed.
Check the decor too
Substrate is not the only risk for barbels. Rocks and driftwood with sharp edges can also rub them, so run your hand over new decor before it goes in and choose smooth pieces.