How to set up iPhone distance alert to reduce digital eye strain and control myopia

Starting in iOS 17 and iPadOS 17, Screen Distance is turned on by default for children under 13 in a Family Sharing group. 

Viewing something such as a device or book too closely for an extended period of time can increase eyestrain and the risk of myopia. The Screen Distance feature in Screen Time uses the TrueDepth camera to detect when you hold your iPhone closer than 30 cm (12 inches) for an extended period, and encourages you to move it further away. Screen Distance can help children engage in healthy viewing habits that can lower their risk of myopia and can give people of all ages the opportunity to reduce digital eyestrain. If you don’t want Screen Distance turned on, you can turn it off in iPhone or iPad settings. 

This info I got from the apple support page.

In addition and maybe more importantly , I would say that regardless of distance, turn on a timer and maximum of 20 minutes for any device or near work /play and then it is 20 MINUTES eye break with no near work. Read more here.