..xhela113..
There is a process in general that covers most things involving Apple accounts
and 'Apple ID protected' secure information; among other important details.
How to request access to a deceased family member's Apple account - Apple Support
//support.apple.com/en-us/HT208510
"This article explains how to request access to or delete someone’s
Apple ID and the data stored with it after they have passed away."
"In the unfortunate event of a customer’s death, Apple provides options
for their loved ones to request access to or delete their Apple ID and the
data stored with it."
A 'court order' is one of those details which may be required to access device
and try to get data from its secure enclave; however often, that may be lost
or erased; depends on how the process evolves, or any pre-determination.
(Should there have been third-party storage, such as Google Photos online
or other aspects, where the iPhone was not the only reservoir of images. As
there might be opportunity should those files already be shared by others.)
.Suggest the article be read, understood; and then refer to adjoining
details, to determine what you'd need do to proceed. ~ Good luck!