unity show ui text on top of sprite code example
Example: unity render text in front of sprite
Add a canvas component to the sprite object. On it mark "override sorting" and put the "Order in Layer" a smaller number than the canvas where the text is (usually -1 should do the trick if your layers are not changed)