Unless you're developing an eye disease like cataracts or macular degeneration opticians are for the most part unnecessary. In most cases opticians just diagnose some form of myopia/hyperopia/stigmatism which everyone can do on their own. They then write a prescription and try to sell you eyewear or eyelid cleansing pads at Apple prices before you walk out the door. Prescription lenses do not and will not improve your vision. They simply assist your vision. Your vision will progressively get worse so eventually you need an even stronger prescription. Rinse & repeat until you die or develop cataracts or something else.
The only hope you ever have of actually preventing vision degradation is by completely eliminating all forms of reading and only looking out into nature for the rest of your life. Reading is the number one cause of vision deterioration because it's purely left/right scanning. Eventually your cornea becomes misshaped and muscles become weakened due to this mostly unidirectional scanning and you develop issues like myopia and stigmatism. No, myopia is not biologically age related. That's why using computers all day makes your vision worse on an exponential time scale. That's why indigenous people who live in nature and look out into the tundra all day maintain hawk-like vision throughout old age. Everyone develops eye issues with age or technology. Technology includes reading. Both can be prevented but never will be prevented because no one is willing to or able to do what is needed.
1. Use the two iPhone accessibility features (red color filter & reduce white point [>85%]).
2. Shorten screen use.
3. Take eye breaks every 20 minutes and look out into the distance.
4. Use orange/red glasses that block blue+green light after 6pm.
5. Sit further away and increase your font.
6. Stop looking down at your phone; hold your phone up at eye level to prevent neck strain which also causes headaches and vision problems.
7. Dark mode is actually more fatiguing so maybe use dark mode only at night and not all day because human eyes are more comfortable reading dark on light.
8. Take some lutein/zeaxanthin supplements.
9. Use LCD instead of OLED e.g. MacBook Air if possible to avoid pulse width modulation. The effects of PWM in combination with OLED displays on the visual system and to some extent the vestibular system, presents real health hazards that all manufacturers choose to ignore.
This is not medical advise. Of course headaches and vision issues could be caused by other medical issues so talk to a medical doctor and ask for an MRI/CT if needed. If you want to also find out if you are developing cataracts or macular degeneration see an optician.