The most common cause of sore throat is the common cold, flu and similar viral respiratory infections. Sore throat can also be observed in patients with Covid-19.
A sore throat can be the result of a bacterial respiratory tract infection too. Gastroesophageal reflux disease may also cause you to get a sore throat. Acid escaping from the stomach into the esophagus can cause irritation and pain in the throat.
Throat lozenges are also added to the treatment respiratory diseases of viral or bacterial origin to provide comfort to a sore throat.
References:
1. https://www.moremd.net/blog/signs-your-sore-throat-needs-a-doctors-care
2. https://www.healthline.com/health/sore-throat-coronavirus#sore-throat-symptom
3. https://health.clevelandclinic.org/can-you-get-a-sore-throat-from-wearing-a-dirty-mask/