The ability to add captions to photos has only recently been added to the iPhone and iPad with iOS 15. And it is not very well described in the User Guide, but one of the best improvements to Photos in a long time. See: View photos and videos in Photos on iPhone - Apple Support (BW) (the paragraph "See photo and video information").
Once you open the Info of a photo, you can type the caption into the field where it says "Add a Caption". When you want to use this information in searches, add the relevant search terms to the beginning of the caption, or they may not get indexed.

The captions will sync with iCloud Photos to your other devices using iCloud Photos.