If you do not deactivate your iCloud account, Apple will lock it, making it impossible to repair. It is essential to delete the iCloud account from your device, otherwise the device cannot be resold, returned, repaired or exchanged. ☁️
First of all, make sure you have made a complete backup of your device.
Follow this little guide, which will help you with the process step-by-step: 🤖