Are the marks tiny circular spots? Are they always appearing in the same spot or in random locations?
If the spots are moving they might be reflected highlights when you are taking photos with the camera pointing towards the sun or another bright light source, a kind of lens flare.
Highlights on moving objects (eg. leaves dancing in the wind or waves on the water) can result in bright, colorful artifacts, when the iPhone is using smart HDR and fusing nine images into a single HDR image.
Unfortunately it is not possible to disable Smart HDR on the most recent iPhone models, so I am just taking several shots, when taking photos outdoors, when the sun is low.