I looked it up.
"YouTube wants to make sure that video views are coming from real people. That's why a YouTube view is only counted when the following two criteria apply:"
- A user intentionally initiates the watching of a video.
- The user watches it on the platform for at least 30 seconds.
There is some other algorithm for shorter videos.