The fetus does not breathe in the womb, and the baby must rely on its own breath to inhale oxygen and expel carbon dioxide.

There is no air in the lungs of the fetus, and the lungs are still a solid tissue.
After the baby was born, because the body was no longer curled up in a ball, the original curled chest suddenly stretched, the chest cavity immediately expanded, and the lung lobes also opened, at which time the first breath of air was inhaled.
Air enters the alveoli from the trachea, the inhalation muscle group immediately relaxes, the exhalation muscle group immediately contracts, and the thoracic cage shrinks to its original size, forcing the air in the lungs to drain.
When the exhaled gas passes through the larynx, the laryngeal muscles contract, the two vocal cords in the larynx are pulled closer together, the gas hits the vocal cords, and the vocal cords vibrate to make a crying sound.
When the baby was first born, the amount of carbon dioxide in the blood was more, which stimulated and excited the respiratory center, so it was a big breath.
Therefore, every baby must "cry" for a while after birth, and when the breathing activity has established a normal rhythm, it will no longer "cry".