If you haven’t already, try taking the light fixture down then start over and feed the chain through the fixture hole again. The pull chain usually gets hung up between the fan and light fixture. That’s what mine does anyway! Hope this helps!
How to Add a Pull Switch to a Ceiling Light
It probably needs to be replaced. I had that problem and the pull chain needed to be replaced. It is a part that looks like this https://amzn.to/2YIQCDx
Homeroad is right , a new socket is less than $10.