In your specific use case, use rather the easiest way:
Click on the Subject (objet in French) of your template mail, then you can do whatever you want with Javascript and targetData object ready for you, and most of all, accurate to the specific recipientId (or Subscriber or whatever is your delivery mapping):

Because, in the Delivery script tab, it is more for global treatment, with specific treatment in the for each loop.
The same kind of use case is when you want to attach a file depending on the targetData context: click on Attach link, then add your file and click on Advanced detail form to add your Javascript test with targetData object usable.
But do it in the Delivery script if the test for adding or not the attached file is far more complex than the data of targetData.
(hoping I am enough clear, sorry English is not my native language.)
Regards
J-Serge