This issue happens to some extent within liunux distros too. I think specifically for youtube maybe it would be beneficial for a single core library that deals with the API and is shared by every single project that cares to interface with youtube. Rather than dozens of projects trying to chase youtube changes and overburdening repository maintainers, there would only be a single library whose updates would be fast tracked. This also requires there to be no embedding it in anything too, I don't know how feasible this would be on android/f-droid, but it kinda already happens with yt-dlp in linux distros, but yt-dlp isn't a proper library nor does it deals with all youtube endpoints that a proper youtube frontend would require.
It would perhaps be nice if yt-dlp could eject it's youtube api handling into it's own project that is then augmented to handle anything youtube related and turns into THE library for dealing with youtube.. maybe even call it libyt :)