Generally, a proper repair session from experienced professionals is enough to fix a misbehaving air conditioner, but sometimes, replacing the old device with a new AC is believed to be a much better alternative.
https://sergeyortis.com/2021/09/29/know-the-right-time-to-repair-and-replace-an-air-conditioner/