If you prepared the old phone properly for resale, as outlined in
What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support
that would have wiped everything on the phone. If you wiped the phone before copying all of the photos elsewhere (e.g., by synchronizing them to iCloud), then the photos that existed only on the phone are gone.
If you didn't prepare the phone properly for resale, and you gave it to the new owner with your photos still on it, the phone might still have your photos on it. There might also be other problems for the buyer and you associated with failure to prepare the phone. (Especially if you left sensitive data on it, or left it logged into your Apple Account.)