2004 Nissan Altima - AC troubles

My car AC was blowing really cold. The windshield was getting fogged up so I switched the dial from max ac to windshield and I would turn the temperature dial from cold to all the way hot. Once I got to my destination I turned my car off. About 2 hours later, I get back in my car, turn it on, put the dial back to max ac, all the way cold, pressed the button to make sure that the ac is on and have it where it circulating only air from the inside and not from the outside. But the AC stopped blowing cold. On the coldest setting, AC is warm and when it’s on hot, it’s extremely hot. Does anyone know what might be the problem? Someone said that it might be something with the dial or something stuck that doesn’t allow the cold air to come through.