Hi, I am a professional certified mechanic, with an engineering background, and 35+ years experience. I will do my best to assist you. Also keep in mind I don't know if you are a pro or a novice so we may have to fine tune the answer. Feel free to add any additional info you feel is needed as we go on. Always keep in mind that I am here to help you with any questions.
When this happens normally there will be a vacuum supply line that goes from the intake manifold to the firewall, and into the passengers compartment, that has become disconnected, or has a hole in it. the AC/heat system uses engine vacuum to direct the air out to the defrost/normal vents/or floor. If the air doesn’t blow out the proper vent normally the vacuum source will be disconnected, or otherwise bad. It is also possible the main switch for the AC/heat will have problems, where it isn’t routing the vacuum to the AC unit. The problem can get a lot deeper, like problems in the actual AC unit under the dash, and that is hard to diagnose, and repair. But that being said, most of the time, the problem is just the supply vacuum line has problems. If you have any more questions, as always, I am here to help. Good luck with it, have a great day, and Thanks for using Just Answer.
I do not get paid for my work unless I am given 3 - 5 stars/smile faces. If the answer is not clear, let me know what additional help you need, and I will assist you further. A bonus and positive feedback are always appreciated, good luck and Thanks.