I'm not sure why you're not answering my questions.
Is this in iCloud Photos or in iCloud Drive?
What iOS is she using?
I may have to say more than is necessary. I understand that your friend wants to reduce the space that her pictures are taking up. But as I said, iCloud Photos does not "transfer all of her photos to iCloud?" iCloud does not behave as an external hard drive for archiving files. I'll go ahead and tell you about iCloud Photos.
iCloud Photos is a synchronization service. When you engage iCloud Photos on a device, then the Library on that device is kept exactly the same as the iCloud Photos Library, and vice versa. So, for instance, if you take a picture with your iPhone, it is added to the iPhone's Photos Library, copied to iCloud Photos Library, and then copied to the Photos Library on each of the other devices that you have connected. If you delete a picture on your Mac, then that picture is deleted at iCloud and on all the other devices. And, if you delete a picture on iCloud, it will be deleted everywhere else. That's what "synchronization" means.
It's important to understand that iCloud also synchronizes mistakes. iCloud is not a backup, and it does not give you a way to fix accidental deletions, for instance.
The phone has option to "Optimize iPhone Storage." If you set a device's Photos to "Optimize Storage," then Photos may store only smaller images on the device and rely on iCloud to keep the full sized images. This is great, since with the lower resolution images you can still scan through all your pictures very quickly, and they look great on the screen. And, if Optimize is chosen, and you want to edit or crop a picture, Photos will reach out to iCloud to get a full sized image for you to work with. Your optimized Library may take up less than 20% of the space of a fully downloaded Library. On my iPhone, Photos takes up way less than 10% of the space it uses on my Mac.
In iOS 18, Optimize is available at Settings>[name]>iCloud>Photos>Optimize iPhone Storage.
Again, this doesn't "transfer all of her photos to iCloud?" You should be sure that iCloud and "Optimize" are what she wants, and that this does not replace a backup to external drives.
Using iCloud Drive, while similar, is a bit different from iCloud Photos.