Why or how do i make this code work

I was watching a tutorial on Youtube and I copied the code exactly the same but it gave me errors and I solved them but the code to jump doesn't work, I'm very new in Unity.

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

public class PlayerControler : MonoBehaviour {
      bool canJump;




    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        if(Input.GetKey("left"))
        {
            gameObject.transform.Translate(-50f * Time.deltaTime, 0, 0);
        }
        if(Input.GetKey("right"))
        {
            gameObject.transform.Translate(50f * Time.deltaTime, 0, 0);
        }

    }

// i think this is the part of the code that doesnt work

void ManageJump()
{ if(gameObject.transform.position.y <= 0)
    {
        canJump = false;
    }
    if (Input.GetKey("up") && canJump && gameObject.transform.position.y < 10)
    {
        gameObject.transform.Translate(0, 50f * Time.deltaTime, 0);

    }
    else
    {
        canJump = false;

        if (gameObject.transform.position.y < 0)
        {
            gameObject.transform.Translate(0, 50f * Time.deltaTime, 0);
        }
    }
}

}

It seems a bit unlikely that this is all that was in the tutorial or you didn't finish it yet. Notice you have a method named ManageJump but nothing is actually calling it. Also as far as I can see canJump is never set to true.

thank u so much bro, i fix the problem thx