Here,I recommend you Samsung Backup software,which allows you transfer data from Samsung phone to computer.What’s more,this Samsung Backup is compatible to most android devices.
Link the phone with a Google account and sync the contacts to Google. Then you can you can later export google contacts to a CSV file or to another device.