You need both a wood fence, a hotwire, and a thorny hedge. Put up a wood fence as high as your code allows. String hotwire cattle fence along it at 1', 2', 3' and on top. Amazing solar systems are available. Landscape a thorny hedge against the fence for additional privacy, protection, scent, and beauty.
There might be other options, but this one is a winner, I think.
Here: https://www.amazon.com/dp/B000BWZB74 and
I use one of those solar powered fence energizers and have been very happy with it. I started with classic wire conductor fencing, but switched to the woven poly/stainless a few years ago, and it has been much more forgiving, and puts a lot less stress on the corner posts.
I use this guy, but it's probably overkill for my little 40' x 40' garden.
Good luck!