Custom Email Header and Footer Template in Magento 2
You can override these templates in your custom theme and edit the html as per your requirement.
app/design/frontend/Vendor/themename/Magento_Email/email/header.html
app/design/frontend/Vendor/themename/Magento_Email/email/footer.html
You can override your core header and footer template into your theme folder,
vendor/magento/module-email/view/frontend/email/header.html
To your theme,
app/design/frontend/{Vendorname}/{thememane}/Magento_Email/email/header.html
Same Process for Footer.html file.
app/design/frontend/{Vendorname}/{thememane}/Magento_Email/email/footer.html
Run
php magento setup:upgrade
php magento setup:static-content:deploy
Clear cache.
This setting available in:
Content -> Configuration -> Default Store View -> Transactional Emails