Thank you for adding a photo.
I'm seeing damage to the wire insulation where I think you were describing burned wires.
The copper looks good, but that's the only good news. The lengths of the wires where the insulation is damaged is now unusable for this circuit.
I can't tell from the photo if you have enough usable wire insulation near the back to be able to safely splice some new wires inside this box.
Also, the remaining insulation is so dirty that I can't identify the wires. My educated guess is that you had 2 white and 2 black wires somewhere in there. That means you should also have 2 ground wires and an attachment point for them on the box, but I can't see that from the photo.
The only thing I can say for sure is that you need to remove some of the length of those wires just in the process of cleaning up this box. After that, you will still need to determine the extent of the damage to what remains. That includes evaluating any possible damage that could have extended beyond the inside of the box.