Without an adequate method of enclosing your yard, you should not rely on a fence as an effective way to keep your cat contained. Fencing however can be used to build a perimeter around your entire yard in combination with angled fence brackets and cat netting.
Angled fence brackets provide extra height and the inward facing angle makes it difficult for your cat to climb over as cats are not great at climbing upside down.
An enclosure built using fence brackets should be at least 1.8m in height, combined with cat netting to provide a physical barrier to prevent your cat from jumping over.
It’s also important that you consider the surrounding environment to reduce the risk of your cat jumping the fence even with cat netting and fence brackets installed. Ensure there are no tall trees or garden sheds etc close to the fence which can aid in your cat’s escape.