Brake light ground issue

If you can twist the bulb socket in its housing it is telling me it's too loose, may need to gently bend a few of the clips. And while you are in that area, check the bottom of the bulbs to make sure the solder points are not worn flat.