If I log in to my account that includes my name, will my previously anonymous device now be associated with my account? What if I do the same in TailsOS?
Yes. That’s how a bunch of people get caught. Sometimes it’s just logging into an “anonymous” account that shares a username with a trackable/traceable network.
Never log into anything if you’re expecting privacy.
A couple things will happen. Regardless of how you access tor (Tor browser bundle, tails, whonix, etc)
Your social media account will be associated as a Tor user.
Any cookies associated with the session, any browser fingerprinting, the browser, that you logged in via tor will now be tied to your social media identity. So if you look up a recipe for lemon meringue pie, and then in the same browser log into your social media account, even though it’s via TOR, someone will be able to say this social media user looked up a recipe for lemon meringue pie
Many social media accounts, will flag the account as high risk now, and require you to do extensive verification of your identity. This is honestly a good thing, to prevent people from attacking your account
What you’re describing, is very much like cutting out magazine letters, dropping a letter into the mail from a random city, and then in the letter identifying who you are with your full name and address. You can do it, but what’s the point?
It’s up to you, if this fits your threat model, the EFF has some good guides, privacy guides also have some good guides, you need to decide how you want to use the internet.
What if I turn off my browser or restart my device afterwards? Is it too late, even on TailsOS/Whonix?
A lot of that depends on your architecture and how you use your systems.
Nothing will keep your activities separated if you do two things in the same session. Depending on your browser you could persist cookies across sessions, or browser plugins, or just a outdated version of whonix could be enough to link accounts
What is your objective in your use case?