First off, I would not reccomend trying to print again with this connector still on your machine. The risk of electrical fires or short circuiting just isn’t worth ruiniing your printer for. Any time you see a problem with the electronics it is a good idea to fix it. I would remove this part and replace it with a new one, making sure that all connections are isolated from each other and making good connections. See if you can talk to the manufacturer/designer or check applicable forums to see if it is a common problem or if someone has already found a solution.
The motherboard is a Ramps 1.4, look for a replacement. After the connector was replaced on the current one it can be a spare one in the future.
The connector melted due to not making a proper connection (corrosion, faulty manufacture etc.) its the +12v wire for heatbed so its gets the biggest load (11A)
Until your new board arrives, or replace the connector, you can solder the cable to the motherboard directly(hot glue is your friend to fix and insulate the solder joint)
Had this issue 1.5 year ago, in my case to connector melted where the cable enters to it, due to bad connection.
piss poor wiring is one part, you shouldnt be able to see the stripped portion of the wire. Possibly connectors not rated for the current. This is why you dont cut corners when buying a or building a printer