Hi AggelikiDoulou,
We see you're experiencing an issue with your wired earbuds disconnecting. Have you checked to see if the iPhone is up-to-date: Update your iPhone, iPad or iPod touch. This is a great step since updates include new features as well as providing bug fixes.
If it is up-to-date, check and make sure the cable and port doesn't have any dust/debris or damage. For steps on how to clean the port, take a look at this article: Cleaning your iPhone.
Next, if you have another device, test the earbuds with that particular cable and the device. Also, if there is a case on the iPhone, temporarily move it to ensure its not causing an issue with the cable. Making sure the issue isn't related to the cable, device, or case.
Hope this helps. Take care.