Question: how to transfer contacts from iphone if phone is broken?
Answer: Go to icloud.com, log into iCloud account you synced the broken screen iPhone with.
Select Contacts, open Gear menu on the bottom left.
Click Select All to highlight all the contacts.
Press Export vCard...