I have difficulty understanding how does CheckLockTimeVerify works. The BIP-65 which proposed CTLV says:

This BIP describes a new opcode (OP_CHECKLOCKTIMEVERIFY) for the
Bitcoin scripting system that allows a transaction output to be made
unspendable until some point in the future.

And the mechanism it works is by comparing the nLockTime field of the transaction by CLTV argument, if nLockTime field is greater than the CLTV argument the execution fails, otherwise will continue as if NOP had been executed.
I can’t understand how it can prevent the spender from spedning the output before specific time or block height. Since the spender can simply set the transaction’s nLockTime field to zero, then it’s always spendable because zero is always less than or equal to nLockTime field. How does CLTV allow a transaction output to be made unspendable until some point in the future when the spender can create arbitrary transactions?

0