A little more detail on what's happening when you try to start it will help. Any lights or noises? The car being locked or not doesn't seem like a likely cause, more of a coincidence.
How long have you had the car? If you bought it used, I would think the battery is a possibility. But your description of what's happening will help everyone here help you.
By accessing this website, you acknowledge that Edmunds and its third party business partners may use cookies, pixels, and similar technologies to collect information about you and your interactions with the website as described in our Privacy Statement, and you agree that your use of the website is subject to our Visitor Agreement.
Answers
How long have you had the car? If you bought it used, I would think the battery is a possibility. But your description of what's happening will help everyone here help you.