Cough and cold are mostly viral. But if its severe, it might be bacterial infection too. Also, For dry cough and for cough with sputum, medications are different.
Next Steps
First try home remedies like steam inhalations and frequent drinking hot beverages like turmeric milk. if not relieved, consult online bacause it will need elaborate discussion of symptoms and signs.
Health Tips
Do not take dry cough syrup for cough with sputum.