asha_kanta_sharma offers some good choices. If you think your friend used iCloud Photos, then you can go to iCloud.com on any browser and sign in with their account. Better, they can get a new iPhone and sign in to their account, and the pictures would automatically load into their Photos Library on the new Phone.
If they didn't use iCloud Photos, then they can restore their phone to be just like the old one using this iCloud Backup restore procedure:
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
Depending on the damage, it's possible to unlock a phone from another device.
If you forgot your iPhone passcode, use your Mac or PC to reset it - Apple Support
Next level, I think, is to go to the Apple Store. They will need your friend's Apple ID and passcode.