I've tried changing the cable but it doesn't work. it's the right type of usb. this happened not too long ago.
I've also tried connecting it to the PC, but it doesn't work.
I don't quite understand how I can proceed to fix the problem
the terminal is telling me.
Recv: echo:busy: processing
Recv: Error:Probing Failed
Changing monitoring state from "Printing" to "Error"
Send: M112
Send: N12 M11218
Send: N13 M104 T0 S019
Send: N14 M140 S0*80
Changing monitoring state from "Error" to "Offline after error"
Connection closed, closing down monitor
With a few more information, we could make some suggestions.
But except the issue you describe, we know nothing: Printer, firmware, systeminfo bundle. That all was asked for in a template you deleted...
I had an issue like that trying to use a UBL vs Bilateral leveling, when I got to G29 F10 my probe would miss the bed. I had to disconnect my usb from the Pi and shutdown the printer. Just turning off the power supply to the printer wouldn't allow it to completely shutdown as it was drawing power through the usb. After reboot and reconnecting the usb I can reconnect no problem. Not really a great solution but should get you to reconnect and try modifying your G-code.
Hope this helps.