Says my cards are too small

I have a Raspberry Pi 5 that I purchased as a retro gaming machine. As soon as I got it I imaged The SD card 512GB in case the card died. The image is 477GB. Well just a couple of months later the card did die so I tried putting that image onto a new sandisk Extreme 512GB card but etcher threw up an error apparently the card is 846MB too small and it would not write. I tried a second Sandisk Extreme 512 GB card and get the exact same error (at least they are consistent) If the image is only 477GB then there is enough space on the card for everything I need even if the sandisk card is only 511GB instead of 512. Win 32 Disk Imager will throw the same error but will give you the option to do it anyway (It mentions that there is a difference between the image and the size of the card but it says the difference is just empty space anyway.). I am not sure what brand the original card is so I cannot just get the same card. Is there a way to make the image of the Batocera sd card 846mb smaller? Since it is just 846mb of unused space will I be ok to let Win 32 Disk Imager give it a try? I do not want to just buy a 1tb card because they are $80. Does anyone have an idea of what to do? Thank you for your help

Hi @jonlopes , welcome to balena forums! Could you clarify your situation as described above, as it’s a bit confusing? What size image are you trying to flash onto a new 512GB SD card? Is it the 477gb image? If so, how is it that the error is related to the card being too small?

Thanks,
Christina