Thanks for reaching out to the Apple Support Communities. I understand you've had some trouble after removing your iPhone from iCloud , and I have some information that may help.
If you are trying to restore your phone to factory settings, you can do so using recovery mode and iTunes. Have a look at the articles below for some helpful steps.
If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support Restore your iPhone, iPad, or iPod to factory settings - Apple Support
If you aren't trying to restore your iPhone, let me know what sort of trouble you are having and any error messages you might be seeing,