Hello Thamer888,
Thanks for reaching out through the Apple Support Communities about that situation with your iPhone.
To verify, your iPhone was initially showing a message about an unknown accessory being detected nearby. You were unable to get further details about that prompt, as you got a message about not being able to connect to the server. Afterwards, your iPhone displayed a message that it had been lost. Did we get that right?
If so, you’ll want to reach out to Apple Support so they can look into your situation: Contact Apple Support They would be in the best position to assist further.
Additionally, the steps from this article may help to make sure someone else isn't able to access your Apple ID: If you think your Apple ID has been compromised
Take care.