Question: how to transfer contacts from your iphone?
Answer: Put your previous SIM card that has your contacts into your iPhone. Make sure that the SIM card fits.
Tap Settings > Contacts > Import SIM Contacts.
If asked, choose where you want to import your SIM card contacts.
Wait for the import to complete.
Open Contacts and make sure that your contacts imported.