For the most part, things that go into iCloud take up space both in iCloud and on your phone.
If you are making an iCloud backup, that is so you can restore data later if something happens to the phone. It does not get rid of the need to store data on the phone.
If you are using iCloud for synchronization, the data will exist both in iCloud (for synchronization with other devices) and on your device (where you can access it even if you do not have an Internet connection). Exceptions:
- If you are using iCloud Photos, you can turn on "Optimize iPhone Storage" to give your phone permission to keep lower-quality, space-saving local copies of your photos. This does not let you delete photos from your phone and keep them in iCloud, but may reduce the amount of space photos take on your phone by quite a bit – if the phone decides it needs the space.
- With files in iCloud Drive, you can select which ones to download to your iPhone and which to leave in the cloud.