Using files known as vCards, you can easily transfer contacts to your Samsung Galaxy S10 from an Android or iPhone. Here are two ways to do it.
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 > ...