If you are migrating to a new iPhone and you want to transfer your data using the option of transferring directly from iPhone to iPhone it might not work if your old iPhone has a newer iOS than the new iPhone that was sitting on a shelf. Try setting up the new iPhone as a new phone and don’t transfer your data. Then update to the newest iOS on the new iPhone. Then after the new iPhone has been updated, reset the new iPhone and go through the transfer process.