Your charging lock is defective or the cable is damaged/unclipped. Annoyingly that will immobilize your car.
The lock sits on top of your charging port, and if you open your hood, there is a little square cutout in the plastic trim over the charging port that allows you to peek in and see the lock. If you then press the charging door open button in your car or on your key, you can see a tiny little plastic gear on the side of the lock rotating. With your fingers, you can also move this gear. By rotating it as much as you can one way or the other, it's usually possible to disengage the lock and get the car driving again.
There is a plastic gear inside the locking mechanism that commonly breaks or loses teeth and causes this issue. The only solution is replacing it