Some alternatives recently discussed:
NewPipe: https://news.ycombinator.com/item?id=47020218
PipePipe: https://pipepipe.dev/
As recommended by https://news.ycombinator.com/item?id=47021252 https://news.ycombinator.com/item?id=47020412
I haven’t used any of these alternatives myself.
Newpipe has been very good at playing and patching the cat and mouse games that YouTube will suddenly roll out now and again.
If you're fine with a paid option (although it's source-available and distributed for "free" on their website), then Grayjay [0] is my personal favourite. I can't remember the last time I saw an error. On NewPipe, I can't say the same.
[0]: https://grayjay.app/