You will need something to assign the item you want to delete.
For instance if you add an area2d around the item and then something, like a player sprite or something else, enters this area2d you can have some code which says if it is in the area and the button is pressed then delete it. So it isnt as simple as just write some code, you need to think about how you are going to logically identify the item in your type of game.