Alveoli are the sites in our lungs where oxygen moves from the air to the blood stream. You can do things like smoking, which damages the alveoli to give you bigger open spaces with less surface area. Less surface area means less efficient. Things like diabetes, or high blood pressure, can cause the space between the alveoli and the blood vessels to increase, making it harder for oxygen to diffuse across and decrease efficiency.
You can’t increase alveoli/surface-area because your lungs are already packed full of them. Thus, you can’t decrease diffusion distance because the space is already as thin as it can be. You can’t increase total volume of your lungs because their size is limited by your ribcage.
The best you can do is just avoid things that make them worse. However, you can increase efficiency of the cardiovascular system which works with the lungs.
There are other things that effect the total picture of “increase stamina” such as increasing stored glycogen in the muscles or increasing one type of muscle fiber and decreasing another type of muscle fiber that is better suited to the activity you are performing (such as for long distance running you will increase Type 1 muscle fibers and decrease Type 2 muscle fibers).
TLDR: Your body becomes more efficient. The blood cells that carry oxygen work better after doing cardio for a while.
How does compare to trying to increase time you can hold your breath?
Holding your breath isn’t the same as cardio. You feel the need to breathe when you have too much carbon dioxide (CO2) in your system, instead of not enough oxygen.
You can train your mind to ignore higher levels of CO2 to pretty absurd degrees. Another trick is to hyperventilate 3 times before holding your breathe. This rids your body of more CO2 than usual, allowing you to hold your breath for a longer amount of time.
Your lungs never really expand past peak capacity, your body simply uses the air more efficiently.