To backup your files with OneDrive, you'll need to turn on the feature in the "Backup" tab of your OneDrive settings.
You can back up messages on an iPhone to your iCloud account, or sync messages from your iPhone to your Mac.