They will both be valid and be able to have blocks added to them but eventually one will become stale.
A stale block is a block that was hashed correctly but is no longer part of the true blockchain.
When two blocks are added at the same time this essentially creates two blockchains. However, only one will remain as part of the true blockchain. Therefore, whichever chain has new blocks added to it first becomes the longest with the most PoW. The longer chain is accepted and the shorter chainâs block becomes stale, unused.
Since stale blocks were at one time confirmed but then removed, it is best to wait until 6 confirmations occur. This ensures your transaction will not be part of a block that goes stale as the chain has gotten longer and been accepted.