iCloud is a syncronisation service, and--as such--it basically mirrors what you have on your phone with what is stored in iCloud (and vice versa).
Apple gives users a choice to mirror your entire Photos Library with Originals, or Optimize your local storage with smaller versions.
I mirror all my iCloud content (roughly 500GB) to my desktop Macs, and optimize the content mirrored on my iPhone.
In iCloud I have about 200GB of photos/videos stored, yet these consume roughly 100GB of storage on my iPhone.
Learn about photo storage and saving space with iCloud.
support.apple.com
btw, you *can* store content in iCloud that does not automatically get mirrored to your devices by manually uploading to folders outside of Documents, Desktop and Photos into iCloud Drive