Lock + Unlock Objects
You can use the Lock command to specify that you don’t want certain objects to move in your document. Locked objects stay locked when a document is saved, closed, and then reopened. As long as an object is locked, it cannot be moved.
You can also use the Layers panel to lock or unlock both objects and layers. When you lock a layer, the positions of all objects on a layer are locked, and the objects cannot be selected.
Lock or unlock layers
Locking is useful for preventing accidental changes to a layer. A locked layer displays a crossed-out pencil icon in the Layers panel. Objects on locked layers cannot be selected or edited directly.