Tile Scripts with Tilemap

I created a tilemap and added ground, water and lava tiles to it. When placed on a lava cell, the player must die. He can swim in the water. There can be many such cells, and they can have different types and interactions with the player. I thought it was possible to add scripts to certain types of tiles in tilepalette, but there is no such possibility. Is there a best practice for working with this approach or is it done differently?