Turn on both iPhones and connect them to Wi-Fi
Sign in to the same Apple ID on both devices
On the old iPhone, go to Settings > [your name] > iCloud > Messages and turn on Messages in iCloud
Wait for messages to finish syncing to iCloud
On the new iPhone, sign in with the same Apple ID
Go to Settings > [your name] > iCloud > Messages and turn on Messages in iCloud
Keep both iPhones connected to Wi-Fi and power until syncing completes
If needed, use Quick Start during setup and choose to transfer data from the old iPhone
If needed, restore the new iPhone from an iCloud backup that includes Messages
If needed, use a computer backup and restore the new iPhone from that backup
Check the Messages app on the new iPhone to confirm the transfer is complete
