My key gets locked in the ignition, which prevents me from turning on the motor.
Hi, over time the tumblers in the lock cylinder can wear out or get debris lodged preventing rotation. The notches on the key also wear out over time which doesn’t fully unlock all of the tumblers preventing the key from turning. If the car is an automatic, there is a sensor that makes sure the car is in park. If the sensor fails, the car won’t know that the transmission is in park and will prevent you from starting the engine. A certified technician, such as one from YourMechanic, would be able to help you determine the why your ignition key is stuck and does not turn.