Welcome to the forums @Kets!
If you have the collision point in global space, then you can convert it so it’s relative to the tilemap, and then use that to get the ID of the tile you collided with. Something like this:
# the point of collision - you will need to change this based on how you are detecting collisions (Raycast2D, Rigidbody2D, etc)
var collision_point = get_collision_point()
var collision_map_point = $TileMap.world_to_map(collision_point)
var collision_map_id = $TileMap.get_cellv(collision_map_point)
print (“Collided with tile ID: “, collision_map_id)
I haven’t tested it though, so I’m not totally sure it will work, but I think something like that is what you’ll want to do if you are trying to get the exact tile the object collided with.