As an action, you touch a door, a window, a gate, a box, a chest, a set of manacles, a padlock, or another object or entryway that contains a mundane or magical means that prevents access. Choose knock or lock as the spell’s effect.

Knock. A target that is held shut by a mundane lock or that is stuck or barred becomes unlocked, unstuck, or unbarred. If the object has multiple locks, only one of them is unlocked. If you choose a target that is held shut with lock, that spell is suppressed for 10 minutes, during which time the target can be opened and shut normally. When you use knock, a loud knock, audible from as far away as 100 meters, emanates from the target object.

Lock. The object or entryway becomes locked until it is broken or the spell is dispelled or suppressed. You and the creatures you designate when you cast this spell can open the object normally. You can also set a password that, when spoken within 1 meter of the object, suppresses this spell for 1 minute. While affected by this spell, the object is more difficult to break or force open; the Difficulty to break it or pick any locks on it increases by 10.