unit: how to create a back timer so my player doesn't get damaged immediately after getting damaged the first time?

So, I have a player taking damage through the SendMessage function, but the problem is that there is no delay between recoil, so the enemy can hit my player like 3 times per hit, and it is a bit annoying. Here is my player's combat controller script:

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

public class PlayerCombatController : MonoBehaviour
{
    (SerializeField) private bool combatEnabled;
    private bool gotInput;
    private bool isAttacking;
    private bool isFirstAttack;

    (SerializeField) private float inputTimer;
    private float lastInputTime = Mathf.NegativeInfinity;
    public float attack1Radius;
    public float attack1Damage;

    private float() attackDetails = new float(2);

    (SerializeField) private Transform attackHitBoxPos;

    (SerializeField) private LayerMask whatIsDamageable;

    private Animator anim;

    private PlayerController PC;
    private PlayerStats PS;

    private void Awake()
    {
        anim = GetComponent();
        PC = GetComponent();
        PS = GetComponent();
    }
    private void Start()
    {
        anim.SetBool("canAttack", combatEnabled);
    }

    private void Update()
    {
        CheckCombatInput();
        CheckAttacks();
    }

    private void CheckCombatInput()
    {
        if (Input.GetMouseButtonDown(0))
        {
            if (combatEnabled)
            {
                gotInput = true;
                lastInputTime = Time.time;
            }
        }
    }

    private void CheckAttacks()
    {
        if (gotInput)
        {
            //perform first attack
            if (!isAttacking)
            {
                gotInput = false;
                isAttacking = true;
                isFirstAttack = !isFirstAttack;
                anim.SetBool("attack1", true);
                anim.SetBool("firstAttack", isFirstAttack);
                anim.SetBool("isAttacking", isAttacking);
            }
        }
        if (Time.time >= lastInputTime + inputTimer)
        {
            //wait for new input
            gotInput = false;
        }
    }

    //player damages enemy here
    private void CheckAttackHitBox()
    {
        Collider2D() detectedObjects = Physics2D.OverlapCircleAll(attackHitBoxPos.position, attack1Radius, whatIsDamageable);

        attackDetails(0) = attack1Damage;
        attackDetails(1) = transform.position.x;

        foreach (Collider2D collider in detectedObjects)
        {
            collider.transform.parent.SendMessage("Damage", attackDetails);
            Debug.Log("MessageSent");
        }
    }

    //this function is called at the end of the attack animation through an event
    private void FinishAttack1()
    {
        isAttacking = false;
        anim.SetBool("isAttacking", isAttacking);
        anim.SetBool("attack1", false);
    }

    //player gets damaged here
    private void Damage(float() attackDetails)
    {
        int direction;

        //damage player here using attackDetails(0)
        PS.DecreaseHealth(attackDetails(0));

        if (attackDetails(1) < transform.position.x)
        {
            direction = 1;
        }
        else
        {
            direction = -1;
        }

        PC.Knockback(direction);
    }

    private void OnDrawGizmos()
    {
        Gizmos.DrawWireSphere(attackHitBoxPos.position, attack1Radius);
    }
}
```