There are certain pests that can be combated by building fences (animals in general), nets (especially for birds, in Europe they cover the tops of fruit trees to prevent birds from pecking at the fruit), greenhouses, etc.
The results are usually quite acceptable.
I don't have this problem because my garden and my orchard are perfectly closed, the only animals that can give me some annoyance are the cats which are impossible to control since they move on roofs, rooftops, walls, etc. without any difficulty. But they do not change too much damage. They only leave their droppings in the middle of the vegetables and that makes it necessary to wash them very carefully, especially when they are eaten raw.
My problem is another as you can see in the photo: it is the white or cottony mealybug of the fruit trees. That not only attacks the leaves but also the fruit of citrus especially. They even favor the arrival of small ants that feed on them, contributing to further weaken the plant because then the ants follow their path and attack the rest of the plant.
This year I have managed to control this pest with an energetic pruning. The orange and tangerine trees are already blooming. Let's see how this story ends in a few months. For now, the white mealybug and the ants are gone.
Greetings to all who participate in these very elaborate comments. I am learning many new things.
Yes @goisal animals is another problem with our garden. Last week we do put some fences in our garden to protect them from cows and goats.