Using L298N bridge to control smart lock
You really don't want an L239D to control that lock. It's overkill.  The L239D is a H-bridge that is designed to drive loads in two different polarities (forward / backwards on a motor for example).

That lock is merely a spring-loaded solenoid. You give it power and it pulls the lock back. You remove power and the spring closes it again.

All you need is a simple transistor circuit just like you'd use for a relay.



Since you insist on using an L239D, here's a schematic for you:







simulate this circuit &ndash; Schematic created using CircuitLab