How can I edit tilemap's tilesets

I want to do a mining system on a 2d game but can I do it with tilemaps? I want to delete a tilemaps component during gameplay how can I do it? I tried to use “tile set” but it just put a new tile doesnt remove old one… what should I do