If your cat displays food aggression, it's recommended to start training from a young age. Hand-feed your cat or hold the food bowl while feeding, and gently pet them with your other hand. If your cat exhibits unwanted behavior, take the food away immediately. This will help establish you as the leader. It's not advisable to use physical punishment as a training method, as this can easily cause your cat to lose trust and become aggressive. 
How to Deal with Food Aggression in Cats
Prevention of food aggression should begin early. When feeding your cat, try hand-feeding or holding the food bowl while gently petting them. This helps build their tolerance to disturbance, and reassures them that you're not going to take their food.
If your cat behaves poorly, take away the food. This teaches them that you control the food, just like a leader. Cats will gradually learn to obey and understand that being protective over food will lead to no food. When they behave well, reward them with some freeze-dried treats to reinforce good behavior.
Should You Punish a Cat for Resource Guarding?
Food aggression in cats needs appropriate correction; otherwise, it may lead to biting as they grow. Cats generally display resource guarding far less than dogs. When food aggression does occur, it might be due to a perceived unsafe environment, particularly in stray cats. For domestic cats, try giving smaller food portions at each feeding and gradually move the bowl while feeding to slowly train them. But for stray cats, place the food and quickly move away. Avoid physical punishment as this will not fix the problem and will destroy the bond between you and your cat, causing long-term trust issues and possibly resulting in fear based aggression.