If you're doing it from time to time and with rate limiting I guess you have nothing to fear? However, If I have to guess, OP tried to downloas his whole library/playlists one shot... Bad move and google just locked them out !
I had a self-hosted metube and limited the max concurrent download and sleep intervals between downloads, just added a library and waited until finished !
Nowadays I'm a soulseek/nicotine preacher !