Welcome to Android Forums!
It might be because the SD card is damaged or has a defect. You can try reformatting it or removing it from the phone and reading it in a card reader, but if there is a flaw, you'll have to replace it. Since you said it was a new phone, take it back to the store and they should replace it for you.