How can you find the name of a e.g. Show horse or dog visible from a distance?
That will not do. With animals / monsters, the names are only loaded if you point them up.
What you can do: Spawn an armor stand with the name over the animal. Then he just has to pursue the animal.
/ data merge entity @e [sort = nearest, limit = 1, type =! Player] {CustomNameVisible: 1b}
With this command the name of the next entity is always displayed.
To undo it simply replace the 1b with a 0b.
Should actually go
I don't know that and haven't seen it anywhere. If it were nice, it would be good to use ^^