Cant get Cooldown to work!?

I am trying to make my character dash, and as soon as i add a simple cooldown to the dash, the dash doesnt complete, it only does about half the dash, i have tried a few things, but the results are always the same, i really need help with this

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

public class PlayerMove : MonoBehaviour
{
    public float speed;
    public float jumpforce;
    private float moveInput;
    private Rigidbody2D rb;
    private bool facingRight = true;

    private bool isGrounded;
    public Transform feetPos;
    public float checkRadius;
    public LayerMask whatIsGround;
    private float jumpTimeCounter;
    public float jumpTime;
    private bool isJumping;

    public float dashSpeed;
    private float dashTime;
    public float startDashTime;
    private int direction;

    public float cooldownTime = 2;
    private float nextDashTime = 0;
    private bool WaitForDash = false;




    IEnumerator WaitDash()
    {
        yield return new WaitForSeconds(2);
    }


    void Start()
    {
        rb = GetComponent<Rigidbody2D>();
        Vector3 Scaler = transform.localScale;
        Scaler.x *= -1;
        transform.localScale = Scaler;
    }

    void FixedUpdate()
    {
        moveInput = Input.GetAxisRaw("Horizontal");
        rb.velocity = new Vector2(moveInput * speed, rb.velocity.y);

        if (facingRight == false && moveInput > 0)
        {
            Flip();
        }
        else if (facingRight == true && moveInput < 0)
        {
            Flip();
        }

            if (direction == 0)
            {
                if (Input.GetKeyDown(KeyCode.LeftShift))
                {
                    if (Input.GetKey(KeyCode.W))
                    {
                        direction = 3;
                    }
                }
                if (Input.GetKeyDown(KeyCode.LeftShift))
                {
                    if (Input.GetKey(KeyCode.D))
                    {
                        direction = 2;
                    }
                }
                if (Input.GetKeyDown(KeyCode.LeftShift))
                {
                    if (Input.GetKey(KeyCode.A))
                    {
                        direction = 1;
                    }
                }
            }
            else
            {

                if (Time.time > nextDashTime)
                {


                    if (dashTime <= 0)
                    {
                        direction = 0;
                        dashTime = startDashTime;
                        rb.velocity = Vector2.zero;
                    }
                    else
                    {
                        dashTime -= Time.deltaTime;


                        if (direction == 1)
                        {
                            rb.velocity = Vector2.left * dashSpeed;
                            nextDashTime = Time.time + cooldownTime;
                        }
                        else if (direction == 2)
                        {

                            rb.velocity = Vector2.right * dashSpeed;
                            nextDashTime = Time.time + cooldownTime;
                        }
                        else if (direction == 3)
                        {

                            rb.velocity = Vector2.up * dashSpeed;
                            nextDashTime = Time.time + cooldownTime;

                        }
                    }
                }
        }
    }

    void Flip()
    {
        facingRight = !facingRight;
        Vector3 Scaler = transform.localScale;
        Scaler.x *= -1;
        transform.localScale = Scaler;
    }
    void Update()
    {
        isGrounded = Physics2D.OverlapCircle(feetPos.position, checkRadius, whatIsGround);

        if (isGrounded == true && Input.GetKeyDown(KeyCode.Space))
        {
            isJumping = true;
            jumpTimeCounter = jumpTime;
            rb.velocity = Vector2.up * jumpforce;
        }
        if (Input.GetKey(KeyCode.Space) && isJumping == true)
        {
            if (jumpTimeCounter > 0)
            {
                rb.velocity = Vector2.up * jumpforce;
                jumpTimeCounter -= Time.deltaTime;
            }
            else
            {
                isJumping = false;
            }
            if (Input.GetKeyUp(KeyCode.Space))
            {
                isJumping = false;
            }
        }
    }
}

Here are some thoughts:

You should move all your physics code (e.g. Physics2D.OverlapCircle) into FixedUpdate() and all your user control code (e.g. Input.GetKeyDown) into Update().

FixedUpdate() is linked to constant time updates. Update() is linked to the display refresh rate. Hence calls to Time.deltaTime have little meaning within FixedUpdate().

For values that do not change, declare them with const or readonly.

Avoid public variables unless they are const or readonly. Instead offer getter/ setter methods. This helps restrict the scope for really awkward bugs where values are changing in seemingly unexpected ways.

Try to aim for clarity in code. For example, instead of:

            if (Input.GetKeyDown(KeyCode.LeftShift))
            {
                if (Input.GetKey(KeyCode.W))
                {
                    direction = 3;
                }
            }
            if (Input.GetKeyDown(KeyCode.LeftShift))
            {
                if (Input.GetKey(KeyCode.D))
                {
                    direction = 2;
                }
            }
            if (Input.GetKeyDown(KeyCode.LeftShift))
            {
                if (Input.GetKey(KeyCode.A))
                {
                    direction = 1;
                }
            }

consider something like this:

            if (Input.GetKeyDown(KeyCode.LeftShift))
            {
                if (Input.GetKey(KeyCode.W))
                {
                    direction = Vector2.up;
                }

                if (Input.GetKey(KeyCode.D))
                {
                    direction = Vector2.right;
                }

                if (Input.GetKey(KeyCode.A))
                {
                    direction = Vector2.left;
                }
            }

Then your code lines 103 - 120 become simply this:

                        rb.velocity = direction * dashSpeed;
                        nextDashTime = Time.time + cooldownTime;

Having simplified code can greatly help with comprehension and debugging.

Make sure to learn/ use debugging techniques- use the debugger if you have Visual Studio (or similar) or debug.log lines.

Hopefully some of these points may prove helpful to you.