My iPhone storage only has 16gb but i buy 50gb iCloud storage
I will give a general answer about what you may and may not store on iCloud, since you didn't specify what data is important to you.



What you can store in iCloud:

Photos 
If iCloud Photo Library is activated you can check the option to optimize phone storage, which will offload your photos and store them on iCloud. Therefore, when you want to view them in full resolution you need a internet connection (be careful with cellular data, especially for videos).

Documents 
You can save documents (e.g. pdfs, pages/word docs,...) in iCloud Drive, with the Files app (requires iOS 11). 

Music 
If you use a streaming service (e.g. Apple Music, Spotify,...) the music files themselves can be streamed (as the name implies) and therefore don't need to be stored locally.



What you can't store in iCloud:

Apps 
You can't store the app on iCloud. The same is true for most app data (exception to this are e.g. pages/numbers/... documents)

System 
Quite obviously, iOS itself needs to be stored locally.



To get an overview of what is using your memory head over to preferences -> general -> iPhone-storage.

Note that some apps (e.g. WhatsApp) store their data in the app and all your chats and their media will be shown as app data.