Imagine a chain tip that looks like (A, B, C) where C represents the most recent block, and the one in which your transaction was included. Suppose next that a miner who had been working with (A, B) looking for C shortly after finds a different block, C‘. Should/could/will the next miner to find a block D build on C or C prime? If they build on C‘, your tx is no longer included in the longest chain. c, containing your block is an "orphan block". This is a simple version of a "chain reorganization". The 6 block rule of thumb seeks to minimize this probability (that your tx is reorged away)
https://learnmeabitcoin.com/technical/chain-reorganisation