When you delete a message that includes an attachment, the attachment is deleted too. To change this setting, choose Mail > Preferences, click General, click the “Remove unedited downloads” pop-up menu, then choose an option. Mail doesn’t delete attachments that you have saved.
Mail automatically downloads attachments you receive based on the download option you set in Delete emails in Mail on Mac