The Restrict to ... buttons, also called the Axis Constraint buttons, are located on the Axis Constraints toolbar, which is off by default.
You can turn on the Axis Constraints toolbar by right-clicking an empty spot on the main toolbar and choosing Axis Constraints from the pop-up menu. These buttons let you specify one or two axes about or along which the transform takes place. They help you avoid transforming an object in a direction you didn't intend.
While the Axis Constraints toolbar is displayed, its controls update interactively to correspond to the portion of the transform gizmo that you are using currently.
Axis Constraint buttons
Only one axis constraint can be active at a time. When a button is turned on, transforms are constrained to the specified axis (or plane). For example, if you turn on the Restrict To X button, you can rotate an object only about the X axis of the current transform coordinate system.
The axis or axes to which you’re constrained are highlighted in red on the axis tripod icon in viewports, or in yellow on the Transform gizmo.
The axis constraints are stored separately at object and sub-object levels. If you set these three controls one way while in sub-object mode and another way while in object selection level, when you return to sub-object mode, they're restored to the way they were previously set. For example, if you're using XY constraints at object level, then switch to sub-object level and use Z constraint, when you return to object level, XY will be restored.
The Restrict To Plane flyout, available from the Axis Constraints toolbar, lets you limit all transformations (move, rotate, scale) to the XY, YZ, or ZX planes (by default, parallel with the Top view).
You can also select planar constraint by using the Move Transform Gizmo. Instead of dragging one of the axis indicators, drag one of the plane indicators near the center of the gizmo.
When you move an object along a plane that is head-on to your view, the object moves along the single available axis shown in the view.