But, just for knowing, can you check without opening socket if wires are lose?
Check for the presence of around 48V DC across the two phone line connections - the centre pair (or next outer pair for a second line) on a US RJ type phone socket, or the next to centre pair for a UK socket.
On the UK system, the external wiring and as far as the "Master socket" body are the providers property.
Any additional extension sockets or other wiring past the master socket is the bill payers responsibility.
For faultfinding you are supposed to remove the add-on DSL filter panel or lower half panel "Customer connection unit" (CCU) from the master socket.
That both disconnects any extension wiring and exposes the providers test socket, where you plug a phone in to verify the providers wiring. You do not remove the back part of the socket from the wall.
The filter or CCU is screwed on with older flat-front sockets and clipped on with newer curved front ones.
If it works there but not with the CCU or filter fitted, then it's down to you to fix your wiring - the provider will charge for any faults in that.
(If you don't have a master socket with a detachable panel, tell your provider and they should update it).
Test sockets, old and new type NTE5 master sockets: