The symptoms as mentioned in your post suggest that it might be due to Infection/Pathology of lung.
So, investigations like X ray chest and Pulmonary function test can clinch the diagnosis.
Other causes of chest pain
(infection/inflammation of the bone-cartilage
2. Strained chest muscles.
3. Short-term, sudden anxiety
with rapid breathing
4. Pain from the digestive tract, such as esophageal reflux
So, it will be better to consult a Doctor & get a physical examination done to rule out other causes. So that proper management steps could be taken.
Wishing you a Good Health.
Thanks & take care.