Your cat may stopped eating because:
Maybe anxiety or depression are reasons why your cat stopped eating.
Maybe a change in the routine could be a reason for loss of appetite.
Maybe your cat has an infections or even can’t eat because of a pain in the teeth.
I suggest you to go to a veterinarian.