Default cant mount internal /data and cant wipe

trying to help a friend. his phone is s-on and unlocked with twrp and he cant get a rom flashed. he said when he factory wipes it says cant mount internal sotrage and /data. what would be the easiest way to fix it all or just start fresh?