How to delete a Device from an iCloud Account via iOS?

I am gonna sell my iPhone. Does anyone know how to Remove a Device from an iCloud Account right in iOS on my iPhone? Your help would so helpful.

It’s doable to remove a device from the devices list on an iCloud account by just using the Settings app in iOS on your iPhone.
From Settings --> Select iCloud --> Tap on your name in the iCloud settings to access your Apple ID account details --> Choose Devices option --> You now are able to choose the targeted devices from the list to remove.