@frankie HookTube was the "real" first, however it did things using the official YouTube API, which made it so it was C&D by Google (unlike all the current frontends, that legally, can't be C&D)
Invidious is the first frontend that used scraping, and the first ( I think Nitter was second but I'm not sure, so it maybe was first) to move from scraping to using an internal API to speed things up.
An Invidious instance to work doesn't have to agree to anything, it's just acting like a web browser, so legally, it's not really different than web browsers.
The project itself is FOSS with no reason to be taken down (and if it ever get taken down from GitHub we'll move anyway).
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!