The larynx is located in the lower part of the pharynx and has two important functions.
Firstly, it can be pulled up by muscle so that the larynx lid located at the upper end can slide over it and thus allow food to penetrate the trachea. (trachea) is avoided.
On the other hand, two skin folds, our two vocal chords, can be tightened and loosened by muscle pull inside the larynx. The air flowing through the glottis can cause the vocal chords to vibrate. This is transmitted to the air in the larynx, pharynx and oral cavity. That's how the voice comes into being.
https://de.wikipedia.org/wiki/Kehlkopf (Wikipedia CC-by-sa-3.0)