What button?
Read this document to learn how to sign out of iCloud on your iPhone, iPad, iPod touch, Apple TV, or Mac --> Sign out of iCloud on your devices - Apple Support
For an Apple mobile device:
1. Go to Settings, then tap your name.
2. Scroll down to the bottom.
3. Tap Sign Out.
4. Enter your Apple ID password and tap Turn Off. (Read this if you If you forgot your Apple Account password - Apple Support )
5. Turn on the data that you want to keep a copy of on your device.
6. Tap Sign Out.
7. Tap Sign Out again to confirm that you want to sign out of iCloud.
Also of possible relevance:
Turn off Find My on your devices and items - Apple Support