If it notices you looking at your device, it'll count that as activity.
While all iPhones will go to sleep by default after a certain period of inactivity, iPhones with Face ID constantly scan for your attention. If you have an iPhone X-style device, you might not realize just how annoying this issue can be.