If a subject providing high-intensity light is in the composition, such as the sun or a spotlight, or a reflection of those, or if such bright objects are near the subject even if outside the composition, excessive light enters the lens and the image may come out with a white flare or bright spots (ghost images) may appear on the image.
Flare and ghost images appear as a result of light that has entered the lens and is being reflected within the lens.
Be careful not to let strong light enter the lens by not including high-intensity light subjects in the composition, or else use the lens hood to improve the photo.
You can also try to change to composition and perspective of the shot, or a different focal length to minimize the flare effect.
NOTE: When there is a strong light source such as the sun in the composition, this phenomenon (veiling glare) cannot be avoided completely in many cases.