There are even fruits and vegetables that deer tend to avoid, which is good news if you grow your own food.
Go with 7 feet minimum. This is how tall a fence needs to be to keep deer from jumping over the top.
If you only need to protect a few vegetable beds or specific plants, it may be easier to enclose those plants individually with cloches, cages, netting, or other physical barriers.
Many of them include active ingredients like cinnamon, clove, or mint in their formulas (scents that deer dislike) and are harmless to wildlife, pets, and children.
Deer will congregate in places where food is readily available which can lead to an unhealthy lack of fear toward humans, increased risk of disease transmission between animals, vehicle collisions, and habitat degradation.