You can transfer contacts from an iPhone to an Android phone using Google Drive, Gmail, or a "vCard" file.
You can back up messages on an iPhone to your iCloud account, or sync messages from your iPhone to your Mac.