It’s hard to say. There are a lot of things that can cause the A/C to stop getting cold.
You could be low on refrigerant. This could mean a small leak somewhere in the system.
You could have a problem with either the compressor or the compressor clutch. The compressor itself is a bit pricey. If the clutch is just failing to engage a new clutch isn’t all that much, and if it’s just a corroded connection to the clutch then it’s no big deal at all. So a compressor problem could be one of the most expensive types of repairs or no big deal at all or somewhere in between.
It could also be a faulty sensor that makes the system think that it doesn’t have enough refrigerant even though it does. This is a fairly cheap repair.
ETA: Make and model of car? Perhaps one of our resident car dopers could tell you what is most likely based on their experience.