I cant make my character jump

Whatever I do, my 3d character does not want to jump (increase y axis). I have a cam that follows the object. It moves up but the object is not moving up.

rb.AddForce(new Vector3(0, 5, 0), ForceMode.Impulse); //I use this when hitting spacebar

Assuming you are in 2D with a Rigidbody2D:

This code will make you jump by using the “W” key.

Rigidbody2D rb2d;
public float jumpHeight; //adjust me in the editor

 void Start()
 {
       rb2d = gameObject.GetComponent<Rigidbody2D>();
      jumpHeight = 20f; //how high you want to jump
 }

void FixedUpdate()
{
        if (Input.GetKeyDown("w"))
        {
            rb2d.AddForce(Vector2.up * jumpHeight);
        }
}