Ouch. Sorry this happened and sad to see that the 3/Ys are somehow particularly suseptible to this (rear quarter, rear door) or front fender/headlight damage.
If you go with a Tesla certified shop, as you should, the final cost will be well north of $10K (at least $12K, at most $18K).
They will have to do a lot of disassembly, undo spot welds, cut aluminium, steel, spot weld in a new rear quarter, replace the rear door skin, repaint all, blend front door, potentially blend rear trunk and bumper, etc. Do all this on a rack and finish up with an alignment and multiple sensor resets.
Wheel damage, tire damage, potential suspension damage, etc.
Often these repairs result in rear window cracking too. Quarter panels arrive damaged from factory and need some TLC before fitting. If there is damage under the outter sheet metal - $$ more cost to replace whats there - if under the side skirt and compromised the battery $$$.
One good thing is all this happened on the passenger side of a Americas market car. No charge port makes the fix cheaper and easier (lots more going on underneath on the side the charge port is on).