After you log into your iCloud account, you can save a copy of pictures and videos in your Photos app into your iCloud File Drive.
How to Save Specific Photos/Videos into iCloud Drive | How to Restore Photos/Videos from iCloud Drive
How to Restore Photos/Videos from iCloud Drive
If you chose “Optimize iPad Storage” within the iCloud setting, your photos and videos in your photos app will automatically back up into your APS iCloud File Drive. To recover these items, just log into your iCloud account and your photos/videos will start reappearing in the Photos app. Below are instructions on how to bring specific photos and videos from your iCloud drive back into your Photos app.