From my personal experience I can say that yes, in some cases the compressor can be repaired instead of completely replacing it. The repair may include the replacement of some parts - relays, capacitors or valves - to return the compressor to its functionality. However, this depends on how badly the compressor is damaged. If the damage is too severe, replacement may be a more rational solution. I recommend contacting a specialist or a service center to assess the condition of the compressor and advise the best solution for your particular case. Great appliance repair company - Fix Up Pro
https://fixuppro.ca/replacement-and-repair-of-refrigerator-compressors/ . They have a site with information about the repair and replacement of the compressor. Read.