Looks like you cooked the threaded terminal off the battery.
If the copper inside your wire was corroding, which does happen,
resistance to current flow increases as corrosion increases.
The electrical current passing through the corroded area will build up
heat which can melt the connection and/or start a fire.
If the connector at the terminal was loose, it might have been arcing,
which will do the same thing.
Never use wing nuts to connect a cable to a battery!
They loosen easily. I know, that's the way you bought the battery.
Ever wonder why your car/truck battery doesn't have wing nuts?
Now you know!
Stainless steel Ny-loc nuts don't vibrate loose.
Yes, they do require the use of a wrench.
Snug but don't over-tighten
Buy an inexpensive volt-ohm meter
and check the resistance in your cables.
If the resistance doesn't read zero, find out why! Fast!
Think about all the places your wiring runs,
and imagine if a hot spot formed there...