Probably in mining a block. They gotta ensure all inputs havent been spent yet right? Ive submitted transactions spending from the same utxo and the miner goes with the highest fee rate no matter which one I broadcast first.
Discussion
They decide how to resolve a potential double spend. But a double spend is really when conflicting txs append to the blockchain. So validating blocks is the preventative measure.