Component dynamic content with @click

I am trying to add html to my component that has elements when clicked should call a local function at the component.
I have tried this way:
image_holder.append('<div class="messagebar-attachment"><img src="..." /><span class="messagebar-attachment-delete" @click=${DeleteImageById} ></span></div>')
It doesn’t work at all, even when I call $update after adding it.
Also, the normal “onclick” doesn’t work and dispatches an error.
Is there a way I can add dynamic content that calls my local function?
Best regards;

No, only by means of component so it will be reflected in template, otherwise use DOM events, e.g. $(something).on('click', ...) in the JS part

$(something).on(‘click’, …) doesn’t seem to work when I put it inside the component script part. I also tried putting it inside $on("pageInit,…) and $onMounted with no use.

Figured it out, thanks a lot!