I’ve gotten prepaid sims for things but obviously that’s not really a feasible method for your main life phone.
They have your identity the moment you put the sim in the phone. The phone have unique identifiers that are recorded when sold.
Buy the phone used and/or with cash. And never put any SIM card in it that can be linked back to you or someone you know.
All the apps on your phone have access to the phone identifier. As well as other information, like your Google account. It’s pretty trivial to tie a phone to you.
As long as you keep to FOSS apps that you KNOW are private (you can tell which ones call home), you should be OK. For example, Lemmy with a throwaway email address, Simplex for communications, Mull with a shitload of blocks, Orbot with RethinkDNS, and so on, you’re golden. Buy your phone in a different country, on Ebay with a throwaway account and a prepaid credit card.
There’s a lot you can do to remain truly anonymous.
Now, my threat model does not require me to go to those extents, but you get the point.