Fencing is your best bet, and the person above nailed it on the height and buried portion. But here's what they might've glossed over: use hardware cloth instead of chicken wire. Rabbit teeth go through chicken wire like it's tissue paper. Hardware cloth has smaller openings and is way more durable. Bury it at least a foot down and angle it outward underground at about a 90-degree angle for maybe another foot - rabbits will dig under, but that outward bend stops them cold. I've seen it work when nothing else does.
If a full fence feels like overkill for your space, there's a solid alternative most people don't think about: plant a perimeter of plants rabbits actually hate. Things like garlic, onions, and certain herbs like mint act as natural deterrents. You won't keep them out completely, but combined with chicken wire cages around your most vulnerable plants (lettuce and carrots especially), you'll lose way less produce. The cages only need to be two or three feet tall since rabbits won't jump into a confined space. It's less attractive to them than open feeding.
One hack worth trying first if you're not ready to commit: predator urine. You can buy coyote or fox urine online, and sprinkling it around the garden perimeter actually convinces rabbits the area isn't safe. It wears off after rain or a couple weeks, so you have to reapply, but it's cheap and takes five minutes. Some folks swear by it, others say it's a waste. Worth a shot before you start digging trenches.