To transfer contacts from iPhone to iPhone, using iCloud is the easiest method. Ensure both iPhones are signed in with the same Apple ID/Apple Account. On both phones, open Settings > tap your name > ...
To export your iPhone contacts to an Excel spreadsheet, you should first sync your contacts with iCloud. Here's what you need to know.