Apple doesn't have an official method for individually locking sensitive apps like Photos with a passcode, but there is a workaround that was introduced with the Screen Time feature that first came ...
In the interests of enhanced privacy, some third-party iOS apps include an option to require passcode or Face ID authentication before they can be opened, even though the iPhone is already unlocked.