If you are using Firefox, there's a great add-on called Invidition that you can install. It redirects Youtube to Invidious and Twitter to Nitter.
Instead I now have a youtube container and have set firefox to open all youtube urls in that container. That way all cookies and session are contained.
What you can also do is delete all cookies and site data when you close your browser and then add some sites to a whitelist (github, HN, etc) in order to prevent having to login all the time. In combination with a good password manager that shouldn't be a big problem anyway.
Instead I now have a youtube container and have set firefox to open all youtube urls in that container. That way all cookies and session are contained.