Object Interaction

I am currently creating object interaction script using raycast method but I dont know how to keep the GUI label on the same location on the object even if the player moves towards it. For example “Press E to interact” that is always on the same spot over the object.
should I use spirtes instead and rotate them accordingly?

You should either use a GUI (and transform the WorldCoordinates to ScreenCoordinats and draw a label there).

Or you should make the gameobject with the text a child of the object where it should be seen. As for the rotation in this case: Make a script that takes the rotation of the player camera and apply it to the object with the text (use the WorldRotation not the local …)