I cannot provide medical advice. A collapsed lung (pneumothorax) in a dog is a serious condition requiring immediate veterinary attention.
A veterinarian will diagnose the cause through examination, X-rays, and possibly blood tests. Treatment may include oxygen therapy, chest tube placement, surgery, or medication such as antibiotics.
The prognosis depends on the underlying cause and severity. Early intervention greatly increases the chances of recovery.
Please contact your veterinarian or an emergency veterinary clinic immediately if you suspect your dog has a collapsed lung.