How to make pressing the same button do different things

I’d like to know something.

In a script, I have two methods that depend on the same input key (in my case the Mouse Left Click key).
When I run the scene and I press the Mouse Left Click button - both methods are executed at the same time.
I thought of some sort of “counting” the clicks so first click does smth and second does smth else but no.

How to simplify this?

Thanks.

You can set a bool in your script that you set to false when the first time is pressed. Depending on whether the bool is set to true or false, the first or second method is executed.

bool firstMouseInput = true;

void Update()
{
    if(Input.GetMouseButtonDown(0))
    {
        if(firstMouseInput)
        {
            FirstMouseInput();
            firstMouseInput = false;
        }
        else
        {
            SecondMouseInput();
        }
    }
}

void FirstMouseInput()
{
    //do stuff
}

void SecondMouseInput()
{
    //do stuff
}

Another possibility would be to set an int as counter, which counts how often you have clicked.