The ignition lock is faulty.
The ignition lock assembly can experience a failure due to a faulty sensor, module, or even a worn-out key. I will advise that you have an experienced mechanic, like the ones at YourMechanic, to inspect the entire ignition lock assembly to determine the proper solution.
Our certified mechanics come to you ・Backed by 12-month, 12,000-mile guarantee・Fair and transparent pricing