Add JS for make a modal in a plugin


I need to add a modal on a image when we clic on it, in a plugin.

I look at this :
And I tried this example :
I add a custom CSS, HTML and JS in a file add in the JS directory of the theme, like this
{% do assets.addJs(‘theme://js/modal.js’, {‘priority’:102, ‘pipeline’:false, ‘loading’:‘async’, ‘group’:‘bottom’}) %}

I have the button for the modal, but no modal when I clic on it, and no error message.

What’s wrong with this ? Do I put JS in the wrong directory ?

Thanks in advance,