I did it that way and didn't lose a thing.
I can't find which iPhone you have so I'll share I used this Apple article.
https://support.apple.com/en-us/ht201274
Saw this
Step 3: Sign out of iCloud completely. Head to Settings > iCloud and find Sign Out at the bottom of the page. For iOS 10.3 and later, Settings > Your name > Sign Out. For iOS 7 devices, choose Delete Account.
Note: if you delete all your data manually without signing out of iCloud, it will also delete the content from iCloud as well -- which is something you definitely don't want.
PER ABOVE I need step by step how to do this so I do NOT wipe Icloud per the warning. I have another Iphone, X, which is connected to Icloud and I want to sell my old Iphone but when wiping it dont want to delete info from the cloud and need to be told how to do it step by step. Please.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic