Howdy pinger2474,
Thanks for posting in the Apple Support Communities.
We understand you've accidentally deleted a message on your iPhone, but still have a copy of the conversation on your Mac you're looking to sync with, correct?
If we have that correctly, we would first recommend backing up your Mac before making any additional changes. If you haven't used Time Machine before and would like to back up your Mac this way, check out the following resource. We'll include some details from the resource to get you started below: Back up your Mac with Time Machine - Apple Support
Connect a storage device to use for backups
Connect an external storage device to your Mac, such as a USB drive or Thunderbolt drive.
• Use this storage device only as your Time Machine backup disk, not for storage of other files.
• Ideally, your backup disk should have at least twice the storage capacity of every disk or volume you're backing up. If your backup disk doesn't have enough storage space to contain a complete backup, Time Machine will let you know.
Once you have a backup of your information for a second copy, see if you synced your Messages on the Mac with iCloud. Although you've enabled this feature, you can also initiate a sync. Keep in mind that your messages may be replaced, so this is why we recommend backing up before proceeding with these steps. Check out the steps below to locate this, or you can view them here: Use Messages in iCloud - Apple Support
On your Mac
1. Open Messages.
2. In the menu bar, choose Messages > Preferences.
3. Click iMessage.
4. Select the checkbox next to Enable Messages in iCloud.
Let us know of the results after working through those steps.
Have a great day!