Providing discount code to an abandoned cart email can incentivize a customer to complete their purchase, sometimes they might get shocked by shipping price or being undecisive, adding a discount code might help them to complete their purchase.
Before editing the abandoned cart email content, make sure that the abandoned cart email is enabled, go to Settings > Checkout :

Ensure the “Automatically send abandoned checkout emails” is checked.

Next, edit the abandoned cart email template by going to Settings > Notification.

Select ‘Abandoned checkout’.

In the email body field, search for “{{ email_body }}” (you can use “Ctrl + F” or “Command + F” in your web browser to search), then add your discount code text after the {% endif %} part that is below it :

You can use the code below to show the discount code text, feel free to edit the text and discount code as well. The text between <strong></strong> will be bolded.
<p>You can use <strong>WELCOMEBACK15</strong> discount code to get 15% off items from your cart</p>
Scroll up and click “Save” to save the email content, then you can click the “Preview” button on the top right corner to preview the abandoned cart email content :

Your customer will then see this email content in their inbox if they have abandoned their cart.
We respect your privacy, unsubscribe any time