While many of us rely on cloud storage these days for backing up photos, videos, and other files, every iPhone that can run iOS 17 also supports external storage devices: that’s every iPhone back to 2018, so it includes the iPhone XR, the iPhone XS, and the iPhone XS Max.
Maybe you would rather manage file backups manually than via iCloud. (It’s always worth remembering that cloud storage isn’t completely infallible.) Maybe you need to access photos taken with a DSLR on your iPhone. Or…