Max height jump

Hello everyone, I have a problem in my code and would like your help. The problem is that when the jump button is pressed, the character jumps repeatedly, I want him to jump only once even if the resume button pressed. I’ve tried a few things but he didn’t jump completely. And I would help so that my character has a maximum height of jump and then return to the floor

if (Input.GetButton("Jump")){
  
  rigidbody.AddForce(Vector3.up * jumpHeight,ForceMode.Impulse);
  }
  else
  rigidbody.AddForce(-Vector3.up * jumpDown,ForceMode.Impulse);

instead of Input.GetButton(“Jump”) use Input.GetKeyDown(“Jump”) or Input.GetKeyUp(“Jump”)

You can try this

if(Input.GetButtonDown("Jump"))
{
   //do awesome stuff
}