Question: how to transfer files from icloud to iphone storage?
Answer: On your iPhone, go to Settings. Tap on your name -> iCloud.
Select Photos and then iCloud photos (or iCloud Photo Library for older iOS versions). ... 
Now, all you have to do is wait until the iCloud photos are downloaded to the iPhone.