You are not the first with this issue
From the archives -
This one looks pretty dang close.
Alt 1- If you have a Marine/RV outfitter close by, You can usually find a bulkhead connector that will wire onto your own cable.
Why did yours fail? - Do some detective work
Why did that connector pull out in the first place? Most likely because it was tarnished or corroded, (therefore not making good contact, → It heated up). It was time to change it anyway.
Don’t stop there -
What usually happens is the other half if this party gets ignored(the cord end coming from your house). If one gets hot, the other one is melted and probably needs changing too. Inspect it closely. If it is 12ga (or better → 10ga), consider cutting off the cheap molded plug on your charge cord and replacing that too.
Up your game?
What you might also consider is stepping away from the 15a household plug entirely. It is the weak point in the charge system. A 20a construction/marine/RV twist lock is a much better choice.