One posibility; If the automatic defrosting feature isn’t working ice will build up inside the walls and doors and it won’t run anymore because it thinks it’s cold enough. This can happen if the refrigerator isn’t perfectly level or it can just not work.
Empty both sides out and unplug it until the walls feel warm which can take a loooong time, even 24 hours or more. A lot of water will drain out. We had one that did this, we never paid to have it fixed but managed to keep it 15 years. It needed doing about once every year. It happened the first time right after the warranty period was up, I think it never worked in the first place.
A few months back, my fridge behaved like this. The back of the freezer compartment was iced up, and as far as I could tell, this was blocking a vent or a fan or somehow interfering with the refrigerator’s ability to cool property. After a complete reboot (i.e. I unplugged it, set a space heater in front of it, and waited a day or two until all the ice had completely melted), it worked again and seems to be fine since.
But yours could be something completely different. A burned out fan motor or something like that is certainly one possibility.
Condenser if on back side: may be clogged with lint/dust. Vacuum and brush clean.
Condenser if underneath: may be clogged with lint/dust. Vacuum and brush clean.
Frost free? If so check catch pan underneath. Empty and replace. The timer could be bad and/or the passages clogged with frost and ice.
Possible loss of refrigerant.
A clogged frost free will take forever to thaw out and drain. Call a service technician.