The default: split it equally
Neighbours generally contribute in equal proportions to a "sufficient dividing fence". What counts as "sufficient" is not a fence type: Legal Aid NSW says the law "does not say what type of fence you should build". It depends on the existing fence, how the land is used, privacy, the fences common in the area, council requirements and whether the fence encloses a pool. If one owner wants something higher, fancier or more expensive than that, they usually pay the difference themselves.
The process
Before doing the work and asking a neighbour to chip in, you generally serve a "fencing notice" setting out the boundary line, the fencing work proposed and its estimated cost. If you build without agreement or a notice, you may not be able to recover a contribution later, except for urgent repairs. If neighbours cannot agree, the Local Court or the NSW Civil and Administrative Tribunal (NCAT) can decide the fence and how the cost is split.
You can always just agree
Nothing stops neighbours reaching their own arrangement, one paying the lot, or agreeing to a better fence together. A quick written agreement saves a lot of grief.
This is general information, not legal advice; for a dispute, talk to your council, a community justice centre or NCAT. If you and your neighbour want a fence measured and quoted, book a free measure.