Electrical issues-can't find parts

Hi! My Kenmore stopped working, mid cycle. No lights will come on. I followed the basic tips on here to determine that yes, power is getting to the unit. I opened it up and clearly there is an electrical issue. My questions are this.

#1. What would cause this?

#2. Seems I need a control panel?

#3. Also seems I need to replace the wiring components but haven’t found that as a part at all. The wiring plugs in by sections but ends up being bundled together as it is fed down to the main power area so do I need to replace all the wires or just the two sections that seem to have issues?

I have tried to attach a picture for reference and really appreciate any help you can provide.

Kier
CIMG0073.jpg (44.4 KB)

Here is a second picture in case that makes seeing this easier. Seems the wire section that is mostly white (top of this photo) started to melt and the wires that are part of that smaller black box thingy that’s plugged in definitely melted.

I don’t understand why this would happen and would love to know what anyone thinks might cause this. Thanks!

Kier
CIMG0082.jpg (75.3 KB)