I first want to comment that you are extremely fortunate to have discovered this before issue before it became a full scale fire in your dwelling.
Having no nuts on the studs to secure the lugs of the supply cord is a serious safety situation. Someone that installed the cord assembly screwed up royally.
If you received the LG oven with the cord already installed from the store or warehouse I would be recommending that you take it back and demand that they give you a replacement that is wired properly.
There is a possibility that the oven is OK and that acquiring a new cord assembly and installing it properly will be the cure to the problem. BUT... be aware that the red wire melted because the connection was high resistance and created a tremendous heat to melt the insulation like that. You will need to very carefully check the red wire from the oven internals that also connects to that stud. If it is in any way melted or discolored then you should seriously look at getting a replacement.