the socket just slides into the reflector. so are you wearied that the socket is loose in the reflector or the bulb is loose in the socket. either one can be tightened up with a pair of needle pliers.
Is the focusing screw in the middle of the back of the headlight in place? The focusing screw goes the back side of the headlight and on the inside there is a spring to keep tension on the socket.
Sometimes the lead contact/s of the bulb are to shallow to keep the bulb under spring pressure. Take the bulb out and solder a small dab on top of the existing contacts. File down to suit and re-install for a wiggle free fit.