Chicken in a pinneaple.
The nodes check the unspent transaction outputs to confirm that specified coins have never been used as an input in another valid-output transaction. If they were used as an input, it means that the BTC in question has already been spent and can’t be used in another operation. The UTXO based model is faster and more efficient than other models. However, the more unspent transactions, the more work the nodes need to perform to confirm the current status of all the transactions and the coins.