Apple iOS 16
With the release of the iPhone 14 and iOS 16, Apple announced a new feature where you could unsend and edit messages on the iPhone. Only users with iOS 16 can use this feature. If the recipient is using an earlier iOS then they will receive a second message saying “Edited to” with your new message.
Unsend & Edit Sent iMessages on iPhone
Similar to the Whatsapp feature where you can delete a message, you can now do this within the Messages App on the iPhone. You can unsend or edit a recent iMessage that has been sent, giving you the option to correct a typo by editing the message or delete the message entirely if you sent the message to the wrong person. The recipient will see that you have unsent a message and will also see if you have edited a message.