How to get click position in Vector 2 ?

In my 2D game, I want to move my player (sprite) to the click location, by Lerp or MoveTowards. I actually may know how to use Lerp or MoveTowards, but can someone help me on finding these coordinates ? I tried a lot of things, like function OnMouseDown, Raycast etc. but I couldn’t make it work properly.
I work in javascript.

You can use Input.mousePosition to get the mouse coordinates and save them to a Vector2. You can then use Camera.ScreenToWorldPoint to convert those coordinates to world space in order to Lerp your player.