At the beginning of 2024, AENA (Spanish Airports and Air Navigation) published a series of new measures related to hand luggage and food that can and cannot be carried at airports.
In the case of liquids, the regulations are quite clear: you can carry a maximum of four bottles of 100 ml each and they can be stored in a 1-liter plastic bag all together.
The liquids that are allowed to be carried in hand luggage are water, soft drinks, juices, sauces, liqueurs and many others such as gels, toothpaste or liquid medications (with these you must bring a medical certificate).
However, in the case of food the rule is more diffuse and has several exceptions. Sandwiches, salads, chips or snacks of any kind and tea bags or other drinks are authorized.
As for the prohibitions, they affect products that have a gelatinous mass such as jam or spreads; high-proof alcoholic beverages, sauces and soups.
Regarding fresh food, it can be brought vacuum-packed without problems as long as it is a domestic flight. If it is international, AENA recommends checking it in even if it is in hand luggage, and if you are going to the United States it is better not to take it, since they have very strict rules regarding the introduction of food.