If you have a NextCloud instance with NextCloud Music app installed you can use its Ampache or Subsonic API implementation with a client in your devices (I recommend Ampache as the implementation is a literal server clone).
If not, as other people suggested Funkwhale.
If you still depend on YT Music, there is RiMusic as a client but prolly will give you errors too after some time if your network is denylisted.
Google adds extra safe-checks to networks which they consider suspicious automatically so you cannot scrape their websites that easy.