In order to create cola and the sulfa Drug Senky needed to create carbonated water via a laborious bamboo construction to the river. How this structure works and how it makes carbonated water?
As we see in chapter 40 Senku has made something resembling a bamboo barrel on a spit sitting in a waterfall turning thanks to some spokes reaching into the falls and is hitched to what appears to be a jar of wine.
The design is never explained in the manga but from what we can see it seems quite clear. The jar labeled wine contains some sort of sugar rich liquid undergoing fermentation whose 2 byproducts are alcohol and carbon dioxide. The jar is sealed aside from a hose which runs from the lid to the bamboo pipe through the barrel which is perforated with many holes and is open on the far side. Carbon dioxide is produced by the alcohol, goes up the hose and through the pipe where some will bubble though the water in the spinning barrel before escaping the far end of the pipe. The pipe seals the spinning barrel (we know because the water hasn't all leaked out of the raised barrel) as it sits in the waterfall which allows the bubbling carbon dioxide to carbonate the water. Carbonation is the process where carbon dioxide CO2 (g) in water H2O (l) in low temperatures and under pressure will react to form carbonic acid H2CO3 (aq). Senku knew what he was doing as he tells Gen the water will be their source of carbonic acid for the creation of the sulfa drug a few panels later. At higher temperatures and/or lower pressure the amount carbonic acid that can stay dissolved decreases and the reaction happens in reverse producing CO2 bubbles and H2O which is how we usually picture carbonated water.