With iMazing, you can easily save conversations from your iPhone's Messages app in various formats:
Anyone who wants to:
Download and install iMazing.
To export your messages to your computer:
Launch iMazing and connect your device.
In the left sidebar, select Messages. To view your most recent messages, you may need to refresh your data.
Select the conversation(s) you want to export.
By default, iMazing will export your entire conversation. If you only want to export specific messages, select them now.
In the bottom toolbar, click one of the Export buttons. This will open a save panel dialog box.
In the dialog box, select where you want to export your files and click Choose.
You can change your Data export delimiter to Comma, Tab or Semicolon from iMazing's preferences: