Sandstone caves are mechanically created caves, either tectonically by collapse or fissures created by divergent movements, or by mechanical erosion from winds, rivers and the surf. All these mechanisms and the associated caves exist, and since the nature of the material is irrelevant, only the hardness or resistance of the rock is relevant, sandstones are predestined for such mechanisms. They are usually soft and can be eroded relatively easily. And so there are a large number of erosion caves in sandstone.
In the last few decades the idea that karst also works in sandstone has gained acceptance. At first people talked about pseudo-karst, which was quite unfortunate because it is karst or it is not. But with the discovery of karst caves in the tepuis of Venezuela, which are formed by karst processes in quartzite and can reach extraordinary dimensions, the process became widely known. And today, sandstone karst caves have also been accepted by science. The mechanisms are the same as in limestone karst, if the sandstone is made up mostly of limestone. But even with sandstones that are not water-soluble, a solution can occur, usually through the corresponding Eh/pH value of the water. In other words, karst is when caves are formed by corrosion, i.e. by solution.
Sandstones consists of grains of rock, the sand and a sort of glue which glues them together, makes it a stone. If you look a little closer you will find actually four components: