If the person you’re messaging is using a device with macOS Ventura or later, iOS 16 or later, or iPadOS 16.1 or later, the message is updated to reflect your edits on their device, and both of you can tap Edited to see previous versions of your message.
If you edit a message to someone who’s using an earlier version of macOS, iOS, or iPadOS, or is using SMS, they receive a new message with your updated text, rather than an edited message.