I am guessing, this is a faulty memory card, or should I say fake SD card.
It's not up to the size (512gb) so what is happening is, you have reached the actual capacity of the card so any new file you transfer will overwrite the later.
To confirm this, try it out with a PC, open three windows, copy files to it, while copying, refresh a window that contains old files, keep in mind the number of files, if I am right, it will be reduced as you copy new files.
I hope you did not move the files to the new card?