This describes how it works at least tiny bit:
>Invidious does not use the official YouTube API, but scrapes the website for video and metadata such as likes and views.[10]