How do I set the mouse position with mouse.warpposition()?

(I’m a beginner)

I really don’t understand how to use this. I looked at the unity documentation but when I try doing this:

void Update()
    {
        if(Input.GetMouseButton(1))
        {
            Mouse.current.WarpCursorPosition(new Vector2(10, 10));
        }
    }

It gives me an error.
Do I need to add something extra at the top, like using blahhbalhh.blahblah; ?
I’m just confused. Any help is appreciated.

Mouse.current.WarpCursorPosition uses the new InputSystem API. Did you downloaded and enabled the new API in the Package Manager?