Usually, commitment schemes are used for this: https://en.wikipedia.org/wiki/Commitment_scheme
(However, if the stakes are high enough, the party that learns the outcome first can choose to exit the protocol if they are unsatisfied with the result.)
If you're worried about someone exiting the protocol, you can use a smart contract to lock their funds so that if they simply exit then they lose all their money.
I think mine from 2017 is a commitment scheme. Certainly is not unique or novel.
https://darkcephas.blogspot.com/2017/07/fair-random-number-g...