The term 'collapsed lung' is a bit deceiving.
Collapsed lung (pneumothorax)
A collapsed lung occurs when air escapes from the lung. The air then fills the space outside of the lung, between the lung and chest wall. This buildup of air puts pressure on the lung, so it cannot expand as much as it normally does when you take a breath.
The medical name of this condition is pneumothorax.
Causes
Collapsed lung can be caused by an injury to the lung. Injuries can include a gunshot or knife wound to the chest, rib fracture, or certain medical procedures.
In some cases, a collapsed lung is caused by air blisters (blebs) that break open, sending air into the space around the lung. This can result from air pressure changes such as when scuba diving or traveling to a high altitude.
Tall, thin people and smokers are more at risk for a collapsed lung.
Lung diseases can also increase the chance of getting a collapsed lung. These include:
In some cases, a collapsed lung occurs without any cause. This is called a spontaneous collapsed lung.
https://medlineplus.gov/ency/article/000087.htm