There are two possibilities
There is another option. The transaction OP made could have been spending an unconfirmed output, which has since become invalid. This could have happened for a variety of reasons - it could have been double spent as a scam attempt, it could have dropped from the mempool, it could have had the fee bumped via RBF.