Hi Allwordsused,
On your Mac navigate open the Messages app and from the menu bar navigate to Messages > Preferences > General. Check to see if the “Keep messages” option is showing Forever or is listed for a specific time frame.
The guide page here can also help with checking: Delete messages and conversations in Messages on Mac
However, if you're looking to export all data you may want to check the App Store for a third-party app or if you're comfortable with the steps check out the article here: Here’s how you can access your entire iMessage history on your Mac
Be sure to backup your data before using any third-party app or steps.
If you continue to have any issues or use iCloud to sync and save Messages, reach out to Apple Support directly to further assist.
Contact Apple Support
Cheers.