Apple’s Clean Up feature, currently available via the iOS 18.1 developer beta, is an Apple Intelligence tool that can remove unwanted objects from photos.
Keep in mind that the operative words here are "developer beta." Clean Up is still in its testing phase — and you really shouldn't download any iOS beta version without backing up your iPhone first. It's a rough-around-the-edges copy that gives some users early access to iOS 18 features before they officially drop later this year.
With that in mind...