You could transfer contacts via Google Account.
Have you ever sync your Android data with Google account for making a backup? If you have, you must know that these backed up files are able to be restored back to the device. So in this case, why don't you try to sync the contacts on the original Android phone to Google Drive and then restore them to another device? Let's make an attempt together!
Step 1. Add Your Google Account to Your Old Android Phone
First of all, you need to add the Google account to your old phone: navigate to "Settings"> "Accounts and Sync"> "Add Account" and then select "Google" from the listed email boxes. After that, you can sign in your Gmail account with password. Supposed that you don't have an account yet, you need to "Create a New Account" first.
Step 2. Sync Contacts to Gmail Account
Now you need to turn on the feature "Sync Contacts" to sync the contacts on your phone to the Gmail account.
Step 3. Sync the Contacts to New Android
Next, you should repeat the Step 1 to add the same Gmail account to another Android phone. Then you need to tap on the Gmail account on the new phone and click "Sync" to transfer the contacts in Gmail to the new Android device.
More detail:
https://www.mobikin.com/mobile-phone/transfer-contacts-from-android-to-android.html