I think Unity is respawning GameObjects on it's own

So I’m making a card game. When the player clicks his card and then the deck, the card should get discarded and replaced.

So I have this:

public GameObject slot1; //item previously selected, ie the card

void Deck() {
        if (!slot1.GetComponent<K_Selectable>().usable)

void Card(GameObject selected)
        if (slot1 = this.gameObject) { //Selects the card u click
            slot1 = selected;

And I have this as well

public void SortOnes(GameObject slot1) {
        for (int i = 0; i < 4; i++)
            if (p1Pos*.transform.GetChild(0).gameObject == slot1)*


deck.RemoveAt(deck.Count - 1);
print("Cards left: " + deck.Count);
position = i;

public void DealCard(GameObject slot1) {
foreach (string card in p1s[position])
GameObject newCard = Instantiate(cardPrefab, new Vector3(slot1.transform.position.x, slot1.transform.position.y, slot1.transform.position.z), Quaternion.identity, p1Pos[position].transform);
newCard.name = card;
newCard.GetComponent<K_Selectable>().faceUp = true;

But the problem is: Although a new card is added, the previous one is NOT destroyed, but if I run just the Destroy(); command, it works; which makes me think Unity is respawning it for some reason.
Any help is appreciated

As I understand, Unity won’t remove the object until you Destroy() it, by design. When you Instantiate() a new one, it simply creates a brand new object. If you’re overriding a GameObject variable with the new GameObject, it’s only overriding the reference that points from the old object to a reference that points to the new object, while the old object continues to exist until destroyed. So make sure to Destroy your object before using the same variable to start pointing to a new instantiated object.

Try using DestroyImmediate() instead of Destroy().

Your code is really confusing me. I really want to help you,
but your way to ask the question doesn’t really help.

Where should it be destroyed?
I propably could write this completly new.
I propably will.