If the frame is loose then the sides of the frame need to be exposed and refixed to the brickwork/framing. Possible cause - rusted fixings.
Sounds like reference to body corporate in the first instance as it is an external door (albeit within your lot).