How to add a Gameobject to a list and remove it from Game World?

I want to add cards (that are already instantiated) to my discard pile list, but then also remove them from the Game World so that they only exist as part of the list. I’ve tried:

        discard.Add(card);
        DestroyImmediate(card);

and it doesn’t work, it adds the card to the list and then destroys the object, so the list is empty. How would I go about doing this

What are you trying to achieve? What does the discard pile list do?

Would it solve your problem to add a copy of the card to the discard list?

GameObject cardCopy = card;
discard.Add(cardCopy);
DestroyImmediate(card);