Cough syrups are cocktails that can contain a variety of different medications.
Antitussives, such as dextromethorphan, suppresses coughing by blocking the body’s cough reflex
Syrups like glycerol coat the throat and reduce irritation
Antihistamines like benadryl open up airways
Decongestants like Sudafed reduce swelling and make it easier to breath and remove mucus
and Pain medication like Acetaminophen (Tylenol) make you more comfortable
This is one of the reasons cough medicine can actually be dangerous because it can lead to accidental overdoses. People don’t read the label and take a cough syrup, tylenol sinus, and perhaps other medications that all contain acetaminophen at the same time which can cause liver damage in large quantities.
Placebo effect, mostly.
> The placebo effect in cough therapy is both a gift and a problem to those working on treatments for cough. It is a gift because cough is so susceptible to a placebo effect with one review reporting that up to 85% of the efficacy of cough medicines is due to a placebo effect. It is also a problem to researchers as with such a large placebo effect it is difficult to demonstrate that any new cough medicine is superior to placebo treatment in cough clinical trials.
[source](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7012959/)
[Wikipedia](https://en.wikipedia.org/wiki/Cold_medicine):
> The efficacy of cough medication is questionable, particularly in children. A 2014 Cochrane review concluded that “There is no good evidence for or against the effectiveness of OTC medicines in acute cough”. Some cough medicines may be no more effective than placebos for acute coughs in adults, including coughs related to upper respiratory tract infections.
Latest Answers