Agree. That's been a poor contact with high resistance which has gotten hot when current passes through it.
You'd need to clean up the holder carefully, and then inspect it to determine if it's still fit for purpose.
Clean away any sooty deposits, and scrape the contacts clean with wire wool or similar abrasive, till they are shiny.
If there are metal springy contacts, perhaps they can be bent out a bit to give a bit more spring force at the contact points?
You may end up having to replace the lampholder.
An LED lamp will draw less current, and will be slightly more tolerant of a bit of resistance in the contacts.