can you make a sprite a button?

can you make a sprite a button using OnMouseDown()
if so how can i change the sprites’ texture, or image.
i tried using gameobject.spriterenderer.sprite but it doen’t work.
does anyone know?

There isn’t any gameObject.spriterenderer; use GetComponent(SpriteRenderer).