Player not jumping despite the jump code being correct

So, I was trying to make the player jump while they have the animation. The player isn’t jumping and despite trying out any methods that I could search up, they didn’t help me in this situation.

Here is a snippet of my current code.

public float jump = 35;
public float doubleJump = 100;

public LayerMask layer;
public float checkRadius;
public Transform bottomPos;

public float gravityScale = 10;
public float fallingGravityScale = 20;

public bool isGrounded;

private bool isJump;
private float jumpTimeCount;
public float jumpTime;

public Rigidbody2D rb;
public Animator animator;
// Update is called once per frame

void Update()
{
    rb.gravityScale = gravityScale;
    isGrounded = Physics2D.OverlapCircle(bottomPos.position, checkRadius, layer);

    if (isGrounded == true && Input.GetKey(KeyCode.Space))
    {
        isJump = true;

    }
    if (isJump)
    {
        animator.SetBool("Jumping", true);
        jumpTimeCount = jumpTime;
        rb.AddForce(new Vector2(0, jump), ForceMode2D.Impulse);

    }
    else if (!isGrounded && Input.GetKeyUp(KeyCode.Space) && jumpTimeCount < 0)
    {
        rb.gravityScale = fallingGravityScale;
    }
    if (isGrounded == true)
    {
        isJump = false;
        animator.SetBool("Jumping", false);

    }
    if (Input.GetKeyDown(KeyCode.Space) && isJump)
    {
        if (jumpTimeCount > 0)
        {
            animator.SetBool("Jumping", true);
            rb.AddForce(new Vector2(0, jump * doubleJump), ForceMode2D.Impulse);
            jumpTimeCount -= Time.deltaTime;
        }
        else
        {
            isJump = false;
        }
    }
    if (!Input.GetKeyDown(KeyCode.Space))
    {
        isJump = false;
    }
}

I found the answer on my own somehow, it’s solved. I just have to use ForceMode2D.Force.