Unity UI Button not working

I have a button under a canvas that is suppose to restart the scene. But instead its not calling the intended function of attached script.

On Unity Forums, I found solutions like it should be at higher hierarchy in canvas, and the canvas should have a graphic raycast and so-on.

But it still isn’t working, although its on click array detects the intended method it is suppose to call.

Have you set the RestartGame() in the Button On Click() Component from the UI Button?