Dynamic Html elements click event Manage

I am using plan Javascript to manage my code, I have certain elements which are appended after certain actions has been performed. I want to trigger click event on those elements, predefining click event by classname is not working as JS gets loaded and DOM elements are updated later on.

SO to avoid that I have used this to solve the problem

document.body.addEventListener('click', event => {
      if (event.target.className == 'close-image') {
          //certain operations
      }
}

But this isn’t ideal solution, because everytime input buttons are pressed it goes out checking className, so any alternative to use this?

I am not using jquery else I would have managed it