Question: how to transfer iphone data to new apple id?
Answer: iCloud Drive. Save data from your iCloud Drive to a computer before turning off this service. You can use the Finder on a Mac or through iCloud.com if you use a PC. Simply move the data to your new Apple ID once it is set up.