Back your phone up to iCloud. Then do a restore to the new phone
the backup should contain all your messages. however they are in SQLite database not readable by a text editor.
https://www.wired.com/2013/11/backup-sms-iphone/
http://osxdaily.com/2018/08/29/how-save-iphone-text-messages/