If you do not deactivate your iCloud account, Apple with lock it making it impossible to repair. It is therefore essential to delete the iCloud account from the device otherwise the device can not becannot be resold, taken back, repaired or exchanged.
First of all, make sure you have made a complete backup of your device.
This little guide has been created to support you step by step 😊