this should be easy enough.
1st you would want to make your UI element you could do this simply as a world canvas or ... well you have loads of options so I will leave that to you for now.
2nd you want to handel the on click so you know when the object is selected. If this is a 3D object which I assume it is you will need 2 things for this to work.
1 = A collider on the object
2 = A Physics Ray Caster on the camera
https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.EventSystems.PhysicsRaycaster.html
Doing that you can now use the MonoBehaviour's mouse events much like you would with a UI object e.g. https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnMouseEnter.html You would use that to show or hide your UI element as noted above ...
So for example you migh thave the UI element be hiden by default and to show when mouse over, then you can use the UI element to know which action the player wants to perform e.g. if they mouse down on the up arrow aka Y axis element then they want to transform on the y and you can apply the mouse Y deleta on the selected objects Y axis.
2nd you want to handel the on click so you know when the object is selected. If this is a 3D object which I assume it is you will need 2 things for this to work.
1 = A collider on the object
2 = A Physics Ray Caster on the camera
https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.EventSystems.PhysicsRaycaster.html
Doing that you can now use the MonoBehaviour's mouse events much like you would with a UI object e.g. https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnMouseEnter.html You would use that to show or hide your UI element as noted above ...
So for example you migh thave the UI element be hiden by default and to show when mouse over, then you can use the UI element to know which action the player wants to perform e.g. if they mouse down on the up arrow aka Y axis element then they want to transform on the y and you can apply the mouse Y deleta on the selected objects Y axis.