The easiest way to keep an animal out is with a fence, but that is more complex than it seems at first. You’ll need to know what kinds of animals are in your area and adjust accordingly. For instance, if you’re near any woods, you’ll probably need a deer fence, and that means a two-inch or less opening size.
Your garden may be a place of contemplation and joy to you, but to passing wildlife, it looks like dinner. There is no malice in a little rodent heart, but that doesn’t mean you’ll be any happier seeing them dig up all your carefully-tended plants. Thankfully, there are many cruelty-free ways to keep your carrots and flowers safe.