Everyone hits Send one second before noticing the wrong attachment. The Mail app on the iPhone has a short grace period, and you can choose to stretch it.
By default you get 10 seconds after sending. Tap Undo Send at the top of the inbox and the message is pulled back before it leaves.
To change the hold, open Settings, go to Apps > Mail and tap Undo Send Delay. Pick how long outgoing mail waits.
Settings > Apps > Mail > Undo Send Delay
Apple’s page says the delay applies to all outgoing emails, not to single messages. That’s the trade-off: a longer delay is a longer wait for every email you send, including the quick “yes, 5 o’clock is fine” ones. I’d choose a delay I can live with on an ordinary day, which rules out the longest one on offer.
The page doesn’t list the available lengths, so look at the picker on your own phone. It also doesn’t say whether anything can be recalled after the window closes, and I’d assume it can’t be done.
Apple’s page is the one for the iPhone, so I’d treat it as the setting for Mail on that phone and look for the equivalent on other devices separately.
Further reading: Unsend email with Undo Send on iPhone
Going deeper: Guide: Immich on Unraid, back up the photos on your iPhone automatically