iPhone messages are stored in an encrypted format on the device itself. This means that it is not possible to access them from another phone without the proper authorization. There are, however, a few methods that can be used to gain access to iPhone messages from another phone.
One method is to use a third-party app that can access the iPhone’s backup files. These apps can be found in the App Store, and they typically require the user to have a jailbroken iPhone in order to work. Once the app is installed, the user can connect their iPhone to their computer and use the app to access the backup files. The messages can then be viewed and exported to another device.