How to create multiple gameObjects?

I am working on an editor for a game where the player can create their own scenario. This editor allows them to purchase enemy gameObject of different types. Doing this is not a problem - I have a list of buttons, each of which lets the player buy a gameObject of “unitType”. But I have a problem with instantiating these units. I have considered 2 options:
1 - every time the player buys a gameObject, this gameObject (a prefab) gets instantiated. But what if the player changes their mind and decides to get rid of that gameObject and buy another one instead (this is still on the purchasing screen)? I suppose I would look for a gameObject with a specific “unitType” and destroy it - but how do I destroy only a single one, instead of all the gameObjects with that “unitType”?
2 - the gameObjects get instantiated only after all the purchasing is done. In that case, how do I instantiate the number of gameObjects of a specific “unitType” that the player has purchased (int inventory)?

The solution was rather simple. When the player pressed the “-” button, a list of objects with the unitType corresponding to that button was created and object[0] in that list was destroyed. Then the list was cleared.