there is one more thing - unless you are using something like chaotic aur, or a very popular package, please pay attention to PKGBUILDS. These are essentially bash scripts which can (depending on your package manager) will run with highest permissions. They can do anything
For those who are want something similar to invidious, you can try youtube-local (not my project, I am just a user). It is a minimal python youtube client, and functions similar to other frontends, but runs locally. You lose some amount of privacy (youtube still has a general idea of who is watching with IPs), but it is not very exact, and there is an option to use tor to get the content. You can also enable sponsorblock, or hide yt-shorts.