Long tap on the message you've just sent. From there, you can select "Undo Send" or "Edit".
How to Edit a message you just sent or unsend a recent message altogether
NEXT TIP
Schedule emails to be sent whenever you like
When sending a mail you can hold the send button and decide when to send the mail.
TIP FROM
9 iOS 16 Features: Lock Screen Customization and Focus Filters
How to customize iOS 16 lock screen widgets, use Focus filters, edit messages, and lift photo subjects