A cough that lasts more than two weeks can be tuberculosis (TB), especially with weight loss and night sweats.
TB spreads through the air when a sick person coughs. It is serious but curable with the right medicine.
If your cough lasts, get tested. The test and the medicine are free in government programmes.
Take the full course of TB medicine, many months, even when you feel better. Stopping early is dangerous.
Cover your mouth when you cough, and keep rooms open and airy.