New Script For Terraria-Like Digging

I am really close to finishing it, but I am kinda struggling in this part:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
public class Break : MonoBehaviour
{
    public Grid gridd;
    public Tilemap tp;
    Dictionary<Vector3Int, int> clickedTile = new Dictionary<Vector3Int, int>();
    // Start is called before the first frame update
    void Start()
    {
       
    }

    // Update is called once per frame
    void Update()
    {
        Vector3Int currentCell = gridd.WorldToCell(transform.position);
        if(Input.GetKeyDown(KeyCode.Space))
        {
            if(tp.HasTile(currentCell))
            {
                Debug.Log(currentCell);
                clickedTile.Add(currentCell, 1);
                if (clickedTile[currentCell] == 2 && clickedTile.ContainsKey(currentCell))
                {
                    clickedTile[currentCell]++;
                }
                if (clickedTile[currentCell] == 3 && clickedTile.ContainsKey(currentCell))
                {
                    tp.SetTile(currentCell, null);
                }
            }

        }
       
    }
  
}

What I am trying to do here is, I am trying to make the dictionary record the grid cordinates if I click on a tile. And if you click on the same tile, it would increase the value by one. And if you click the tile while it is 2, it would destroy the tile you click. But gives error:
ArgumentException: An item with the same key has already been added. Key: (19, -1, 0)
System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) (at :0)
Break.Update () (at Assets/Scripts/Break.cs:25)

Error is saying your error is here:
clickedTile.Add(currentCell, 1);

And it’s saying you’re trying to ADD a line that already exists, which is true (duplicates not allowed)

so…

check if exists and update, otherwise add. Think you can just assign directly too: