Yes, it is a cause for concern if your cat suddenly started hiding and only comes out for food. This change in behavior may indicate that your cat is experiencing some kind of physical or emotional discomfort.
There could be several reasons for this behavior, such as illness, pain, stress, anxiety, or a change in the cat's environment or routine. It's best to take your cat to the vet for a check-up to rule out any underlying medical conditions.
If the vet rules out any medical issues, you may want to consider if any changes have been made to your cat's environment or routine that could be causing stress or anxiety. It's important to provide your cat with a safe and comfortable environment and to keep their routine as consistent as possible.
In any case, it's essential to address the change in behavior as soon as possible, as cats are often very good at hiding signs of illness or distress, and delaying treatment could result in more severe health issues.