It wasn't that long ago that a lens hood was mandatory gear. Hoods serve the dual purpose of helping to protect the front element from accidental bumps, plus assist in blocking stray light falling directly on the glass.
But no practical person rigs up a lens hood for his iPhone. And it's rare that I even see them on mirrorless cameras as well.
But not using a hood doesn't mean that flare won't compromise your image when shooting toward the sun. The biggest downfall is contrast degradation. If you do a "before and after" test with your hand shielding the lens, you'll see what a difference it makes eliminating stray light.
So, by way of reminder, I say this: first, be aware of situations where flare might occur, then, take steps to prevent it. Most commonly, I will cup my hand and use it as a temporary lens hood. I'll move it around until I find the position where the stray light is blocked, but my hand isn't part of the picture.
If it's convenient for your camera, a lens hood still makes sense. It doesn't always eliminate flare by itself, but it definitely makes it easier to control. Plus, you can cup your hand on the outside of the hood, then use them both together.
Regardless of the method that you use, beware of flare, and don't let it compromise your shots.