Turn off Activation Lock and remove device from iCloud
If you forgot to sign out of your Apple ID account and turn off the Find My feature before returning your Apple product, you can turn off the Activation Lock using the Find iPhone tool on iCloud.com
1. Sign in to iCloud.com with the same Apple ID account that’s still signed in on the returned device
2. You may be required to enter a Two-Factor Authentication code. The verification code will be sent to your other device(s) sign in with the same Apple ID. You can select “Didn’t get a verification code?” at the bottom to use an alternate verification method
3. Once verified, you may be asked to Trust this browser
4. Select “Find iPhone” and sign in again if prompted
5. Click “All Devices“, then select the device you want to erase. If you do not see “All Devices“, it’s because you’ve already selected a device. Click the name of the current device in the center of the toolbar to access the devices list, then select a new device
6. Erase the device and conform
7. Sign in and enter the Two-Factor Authentication code again if prompted
8. Since the device isn’t lost, do not enter a phone number or message
9. Click “OK“
10. When the device is erased, click “Remove from Account” and confirm with “Remove“
11. All content on the device will be erased