Hello and hope you are doing well.
If with movement you are getting pain it is likely to be an inflammation of the skin, subcutaneous tissue or the bone. This can happen with injury, repetitive activity or an infection of the skin. Sometimes it can be costo-chondritis, inflammation of the sterna rib junction. The constant coughing could cause muscle strain and chest pain. Sometimes the pleura, the lining of the chest cavity and lungs can get inflamed causing pain with coughing. Only clinical correlation and other investigations besides X rays can help to narrow down the cause. In the meantime you can take OTC pain medication Ibuprofen. Ensure to take this medication after food to avoid gastritis.
Hope this helped and do keep us posted.
You might have developed pneumonia or some other respiratory ailment.