How can I hide sprite image after its animation is played on 2d canvas?

as I have created a 2d animation on UI of the game so I could not hide the object after its animation is played.

Good day.

You have first 2 things. Detect when the animation has finished, and hide the sprite

Look some youtube about animations to learn how to detect that. Once you know that, you have multiple options for “hide” an image.

You can desactivate the full object with SetActive(false)

You can disable the image component of the object with enable=false

Or you csn even destroy the object with Destroy();