How do I constrain a transformation to an objects axis?

Sorry for the noob question but I’m trying to figure out how to move Verts, edges and faces so that they only move along the XY and Z axis of the object, not globally. Example: If I create a cube, then move one of its faces in the Z direction it goes up or down. But if I rotate the cube so that the top and bottom are in a diagonal angle, how do I constrain that same face in the new diagonal direction so it stays perpendicular to the cube?

any help is much appreciated thanks.

Change the Transform Orientation that is by default on “Global” to “Normal”

Select the face you need to move, then press G then Z (you’ll notice in the bottom of the 3D View the mention “along global Z”) and Z again (it will change to “along normal Z”) and you’ll be able to move that face along the Z of its normal.

Assuming your face is planar, it should do what you want.

or you could simply go into local mode if rotation has been done in object mode !