stop player from holding input

my player can walljump but if the player holds down the walljump button the player will just walljump on its own basically I want the player not to be able to walljump for a few seconds

 if (Input.GetKey(KeyCode.JoystickButton1)&& iswallsliding == true )
    {
     walljumping = true;
     Invoke("walljumpfalse",walljumptime);
           
    }
   
    if(walljumping)
    {
    rb2d.velocity = new Vector2(xwalljump * -moveHorizontal,ywalljump); 
    }

If you use Input.GetKeyDown the action will only happen on the frame you pressed the button down.

You can also add a timer inside the Update.

    private void Update()
    {
        timer += Time.deltaTime;
    }


    ...
    if (Input.GetKeyDown(myKey) && timer > 1f && iswallsliding)
    {
        // Do the jump
        timer = 0f;
    }