Hmm, can be when software (macOS or Mac OS X) on your Mac is older than your iPhone, which means it can't recognize it properly.
You can transfer it manually into Windows PC and try from there (if songs are on the cloud then simply install iTunes on Windows PC and give it a try)