When you want to free storage on your device by loading items off to iCloud, use the "Optimize Storage" feature for iCloud, as described here: Manage your photo storage - Apple Support
Then some of the documents and data you are storing on iCloud Drive will be removed from your iPhone, when free storage is required and recovered from iCloud, when you need to use them.
Without "optimise storage" all documents and data are stored in iCloud and are mirrored on your device, so you will not save any storage locally. it may take a while, until the optimisation will have freed enough storage.