How to move selected object exactly towards/away from the camera origin?
if i understood you right, you want to change the axis from global to local.

Then select your camera and press G and Z. Now you can move the camera by moving your mouse and it is just zooming in and out now.
UPDATED ANSWER:
ok, now you have an object and your camera in the right position and rotation so that you see your object perfectly through your camera.
Now select your camera and tap on &quot;local&quot;

then tap on &quot;+&quot;
then you got this

then tap on your object and with G -&gt; Z you can move your object as you wanted.
Viel Erfolg! ;)