Apple today released iOS 17.5.1 and iPadOS 17.5.1, minor updates to the iOS 17 and iPadOS 17 operating system updates that came out last September.
According to Apple's release notes, the updates include a fix for an issue that could cause images to reappear in the Photos library even after being deleted.
This update provides important bug fixes and addresses a rare issue where photos that experienced database corruption could reappear in the Photos library even if they were deleted.
Apple Releases iOS 17.5.1 With Fix for Reappearing Photos Bug - MacRumors
Apple security releases - Apple Support