How can I effectively add a script to a product page?

Hi, I am trying to add to shopify drag and drop see this page: https://codepen.io/prasanjit/pen/NxjZMO

When I use html and scc it shows up and I can load the file as well.

The problem is that when I load the file, the name does not change after drag and drop (javascript does not call)

I added javascript to main-custom-product-liquid using

Can you advise me how to invoke this script? Thank you