Merchants dealing in precious goods would travel with their own set of weights. Either party to a transaction would use their own weights, if the eyeball test suggested the other party was low or high balling the weight.
End result is that everyone in trading radius has standardized on the same size, within the precision of visual inspection and the beam balances in use at the time. Chunks of bronze and silver in that standard weight co-evolved to also be the medium of exchange.
So if someone wanted to buy 10 shekels of peppercorn, or was receiving 10 shekels of silver for a lamb, it's the same thing: if the weights/money look light you can check them against your reference set. Pressing them into disks with writing and a face came later.
The human drive toward standardized goods for exchange is truly ancient. Rare shells of a consistent size, with a hole for threading, have been used as money by many peoples well into historical times, and have been found as grave goods as much as 80,000 years ago.