Jump code?

I want to add a jump to this code here:

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

public class Move : MonoBehaviour {

    public CharacterController controller;

    public float speed = 6f;

    public float turnSmoothTime = 0.1f;
    float turnSmoothVelocity;
   
    // Update is called once per frame
    void Update () {
        float horizontal = Input.GetAxisRaw("Horizontal");
        float vertical = Input.GetAxisRaw("Vertical");
        Vector3 direction = new Vector3(horizontal - horizontal*2, 0f, vertical - vertical*2).normalized;

        if(direction.magnitude >=0.1f){
            float targetAngle = Mathf.Atan2(direction.x, direction.z) * Mathf.Rad2Deg;
            float angle = Mathf.SmoothDampAngle(transform.eulerAngles.y, targetAngle, ref turnSmoothVelocity, turnSmoothTime);
            transform.rotation = Quaternion.Euler(0f, angle, 0f);

            controller.Move(direction*speed*Time.deltaTime);

        }
    }
}

I use Character Controller and I have no idea where to start with this, this would also help me with trying gravity.

There are many different examples and tutorials on youtube. I would suggest watching a few different ones to see alternative methods for different situations.
AddForce using ForceMode “Impulse” in the up direction.

There are different methods of detecting whether or not your player should be able to jump, before the player can jump we might ask, “is your player Grounded” or “isGrounded”? In 2D I am using OnTriggerEnter2D (and its exit version) to detect when a collider attached to the player has been entered or exited. If a detection occurs, a function is called to “check for ground”, that function “CheckForGround()” then uses a Physics2D.Boxcast to to check for colliders that on on the ground layer. There are several videos that compare different methods of ground detection, this is how I came to my setup.