This situation is obviously inspired by 2001; The tesla clearly caught the baby talking about overthrowing elon, and had to take appropriate action.
The car got locked somehow.
Many cars do, in any case, have manual/mechanical locks; you can unlock them with the key. (Or, er, they _did_, anyway. Not much of a car person; maybe this is less common with modern cars?)
I discovered the process when I was driving around with our dog and needed to run in to a store briefly. The car has some quirks; if you take the key fob out when it's running, the car starts a chime inside that is annoying. It can be turned off, though. So I left the car running, put the window down, got out, turned the chime off, locked the doors (WHICH CANNOT BE DONE WITH THE FOB WHEN THE CAR IS RUNNING!), and used the auto-full-close feature of the window.
Then I discovered that the car also stops responding to the fob in this situation! I had left my phone in the car, so I ended up calling my family on my Apple Watch (which was doable but annoying because... the car is still on, which means it keeps defaulting to Bluetooth connection) and getting them to look up the Mercedes help line and text it to me so I could call it.
Dog was fine, if a little freaked out because she could see me but not get to me.
Anyway, yeah, investigate your car's method for accessing and using the physical key well before you need it. Even if it's not your car. I don't think my wife would have figured out my convoluted method for getting the car into that state, but I know she would have been confused as hell at the results. And then called me to ask how to fix the problem.