If the pain is present only when you cough, deep breathe, move around, etc.
And not all the time, then it is most likely musculoskeletal pain. The most likely diagnoses are muscle strain, cartilageinflammation or rib fracture. These will all resolve once the cough goes away gradually over days to weeks. If the pain worsens, or is present all the time, see your doctor.
Would you like to video or text chat with me?