Quick Blender tip for beginner, here is to show how we can lock object in position. In Blender for object position, we use Location. We can find location in Object Properties and Transform Panel. Below is showing the 2 ways how we can lock object in position (location). Happy sharing and I hope this helps. More Blender Tutorial are available here.
How to lock object in position in Object Properties
1. To show clearly that the position (location) is lock, Transform Gizmo is selected and showed on the object.
2. Then, we can go to Object Properties, go to Transform. We can lock X, Y , Z in location. Then Transform Gizmo has not shown arrows for moving.
How to lock object in position in Transform Side Panel
3. Alternative, we can press shortcut N, to show Transform Panel. Under Transform, we can lock X, Y , Z in location.