Don't need to turn off two-factor or downloading any software. Just restore your iPhone backup from iCloud or iTunes (if you have one). It will restore all your messages.
Please find relevant resources below.
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
How to check if you have an iCloud backup on your iPhone:
settings -> iCloud -> tap on storage -> Manage storage -> here you can find backups if you have one in iCloud
iTunes on Windows: Click edit on menu bar -> preferences -> devices -> here you can find any backups of your iPhone
iTunes on Mac: Click on iTunes on menu bar -> preferences -> devices -> here you can find any backups of your iPhone
Syam