Fence will need to be pretty high. 6-8 foot seems to be the norm to keep them fro jumping.
Anything less than 6 feet is just an ornament and won’t even keep a goat out-the fence that is already there is 6 feet-the fence I had at the other house was 7 feet. There is a hole/gap in this fence someplace downhill by the river, and I have some fencing to fix it, if it is not too big a gap...