The disk needs several lists. one is the logical to physical block list(mapping list). one is the clean list and one is trash list.
Now the trash + clean list needs to be larger than the logical list otherwise it will never work.
If you had a drive with 10 pysical blocks all in the clean list the mapping list must be at least 1 block shorter but probably drives set aside a lot more than just one block.
Any way your first write would take one block from the clean list and put it in the mapping list so that block 0 now point to it. your next write would take a new block from the clean list and map block 0 to that instead and take the old block and put it on the trash list.
if you write another time to block 0 yet another one would be taken from the clean list the mapping would be changed and the previous block put on the trash list.
In the background the drive would erase any block on the trash list and put them back on the clean list.
Writes that happens when no clean blocks exist has to wait for the erase to finish.
Now reality is more complex as the filessytem blocks size and flash block size is not the same size and you need to sometimes move data around to even out the write count per block as there is a limited amount of erase that can be done to a block.
But the disk do not need to know what blocks are used for this to work it simply assumes that the entire disk is used. but if it could know it could put a lot more blocks on the clean list and not need to set aside as much blocks for perfomance reasons. It still needs extra blocks as flash blocks is unreliably and may fail after just 1 erase if you are unlucky.