Cause of lens flare
Flare occurs when stray light strikes the front element of a lens and then bounces around within the lens.
This stray light often comes from very bright light sources, such as the Sun, bright studio lights, or a bright white background.
If a light source is in the lens angle of view, a lens hood will hardly have any effect, but the light does not have to cause lens flare.
It is sufficient that stray light from a bright light source enters the lens.