My dad built the fence around the house I grew up in back in the mid '60s. He used brackets similar to these for the posts:
https://www.permacolumn.com/wet-set-models
That keeps the wood out of the concrete/dirt and allows for eventual replacement with relative ease. Thing is, because he used those the posts haven't rotted and that fence is still standing today.