Does it give all your pictures or the one you want to search for an image using AI? Cause one method makes sense as your phone doesn't have the power to do that. If it sends all your photos to Google that's dumb.
iOS has on-device image search without sending any of your photos somewhere, and it works quite well! I reckon any mid-to-high end google phone is powerful enough to do that too.
Depends on the operation. Basic object recognition... your phone can easily do. Can run object database against an image after you take the image and store the found objects in metadata. Then you just search the metadata.
This doesn't have to go to the cloud if that's all you're doing.
I do this on my Nextcloud instance. It doesn't require a full "AI" implementation to do at all.