Garlic is one of the vegetables you can freely plant without worrying about animals eating them. The plants and their distinctive aroma, for whatever reasons, are unappealing to animals likely to invade your garden.
Onions are very bad for animals and so they tend to keep away from them. You can plant as many onions as you want and be confident that no animal will approach them. Onion leaves are similar to garlic and other vegetables. That doesn't mean animals won't notice if you try to mix the crop, but you can try creating a fence of onions or garlic around the rest of your plants; it may work to dissuade deer, for example.
You can try some aromatic plants, such as mint or sage. These are safe, mostly from deer, but also can work for rabbits or chipmunks. These aromatic plants are the most likely to be safe from all animals. You can try to plant them around your garden or spread them around your plantings for better results against critters.
Not all, but many flowering plants are not liked by animals. Daffodils, lavenders, Bachelor's buttons, yarrow and sunflowers are safe from deer. Russian sage, orange globe mallow, gladiolus, caryopteris, various salvia, coreopsis moonbeam, agastache, rosemary, chamisa, sages (Artemisia) of all varieties, oregano, thyme, nepeta, cold hardy Spanish broom (cytisus), ratibida (yellow and Mexican Hat), silver-edged horehound and evergreen bushes and trees are safe from rabbits.