It is likely the motion controls are turned on and they may be blocking it. As this mechanic does not have a tutorial, it can also be somewhat puzzling to new players that you have to tilt the lock to the left so that it does not jam, because when you turn to the right, it blocks.

You can also reconfigure your joycons in the Switch settings, which can help. Switch Main Menu -> System Settings -> Controllers and Sensors -> Calibrate Motion Controls. And there, you can recalibrate consoles and controllers. You can do both.

Additionally, you can also update your controllers in this menu.

It should also be noted that there is no vibration on Switch Lite, so if you have this version of the console, you the lockpicking mechanic can be quite confusing, indeed.