It looks like you tried to attach a SpriteRenderer to your button to render its visual in your game scene rather than as part of the UI. This means that where the player sees the button, and where Unity thinks the clickable UI is, have no relationship to one another.
The UI Button On Click event fires only on clicks on the UI Button itself.
If you click the SpriteRenderer, that is not part of the UI system, it is not the same as clicking on the UI button.
To detect a click on a Sprite, add a Collider to it, and use a script to listen for clicks:
void OnMouseDown() {
// Do the thing.
}
Note that the presence of this method forces Unity to fire a ray into your scene every frame to track mouse interaction with colliders in your scene, so it does have a performance cost.
Or, you can click the button itself, by getting rid of your SpriteRenderer and instead using a World Space Canvas to draw your actual UI button where you want it in the scene. Then you have all the power of the normal UI system, and the freedom to position it anywhere in your world that you want it to go.