Changing adjustable fixture light bulb when socket and housing are loose
It looks like the lampholder part of the fixture had a threaded boss, which the swivel post screwed into, and that has broken.

You might be able to repair by disassembling and using washers, lockwashers and a matching threaded nut on the inside of the lampholder part. It would take significant effort so it might be easier/better to just replace the fixture. You should definitely not use it like it is.