AddForce Jump Doesn't Work

Hello , I don’t know why Jump don’t work // im new in unity so i need some help
Note : walk is good!!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{
    CharacterController controller;

    private Rigidbody rb;
    private Animator playeranim;
    public float speed = 18.0f;
    public float gravity = -12f;
    public float jump = 15f;
    private float verticalVelocity;
    public bool IsOnGround = true;

    Vector3 movedirection = Vector3.zero;
    
     
    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody>();
        playeranim = GetComponent<Animator>();
        controller = GetComponent<CharacterController>();
         
    }

    // Update is called once per frame
    void Update()
    {


        Jump();
        walk();
   
    }


 

    void walk()
    {
 

        float leftrightzft = Input.GetAxis("Horizontal") * 3f;




        if (IsOnGround == true)
        {
 
            movedirection = new Vector3(leftrightzft, 0, 2f);
            movedirection *= speed;
        }
 
             
            controller.Move(movedirection * Time.deltaTime);
 
    }

    void Jump()
    {
        if (IsOnGround&&Input.GetKeyDown(KeyCode.Space))
        {
            rb.AddForce(Vector3.up * jump, ForceMode.Impulse);
        }

    }

    private void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.CompareTag("Ground"))
        {
            IsOnGround = true;
        }

    }


}

Do not use both a character controller AND a rigidbody on the same object. Choose one and stick to it. Also, the reason that your jump doesn’t work is because you have isKinematic checked on your rigidbody. Your character can be controlled directly or by physics but not by both at the same time. You likely want to control your character directly, (controlling your character by adding forces is much harder and offers less control). If you want to “Add a force” to a kinematic rigidbody or a character controller, you have to simulate this yourself by keeping track of the velocity of the character, and then moving it by that velocity every frame.

public float jumpStrength;

private Vector3 _velocity;
private float velocityBleedSpeed = 2f;

void Update(){
    Jump();
    controller.Move(_velocity * Time.deltaTime);
    _velocity = Vector3.Lerp(_velocity, Vector3.zero, velocityBleedSpeed*Time.deltaTime);
}

void Jump(){
    if(IsOnGround && Input.GetKeyDown(KeyCode.Space)){
        _velocity += new Vector3(0,jumpStrength, 0);
    }
}