YouTube works in browser, but the native iOS app offers a much more polished experience than the mobile web UI, especially for actually browsing the library.
It can ask for permissions like push notifications, I can't install ad-blockers on it, and they otherwise get more control over it. They even seem to intentionally treat web users a little better, cause I just got a full-sized homepage ad in the app for TikTok of all things, with a download button. The site doesn't have that, and I made sure to disable my blocker. Maybe they consider app users more captive of an audience, or they simply bring changes to it first that are generally about further monetization.
Not a huge deal though. In the past, pre-iOS-10 Safari was immune to the "no background playback" rule the app had, and before that, the site had no preroll ads while the app did, so it was a clearer difference.