Cough medicines or cough syrups aim either to suppress a dry cough, or to help you to cough up the phlegm (mucus) of a chesty cough when you have a URTI. There is no good evidence that they do help. This is partly because many coughs get better quickly on their own anyway, so it is hard to tell if the cough medicine has helped or if the cold has simply got better.
This is a companion discussion topic for the original article at https://patient.info/chest-lungs/cough-leaflet/cough-medicines