I am aware that governments, organizations and hackers can do a plethora of things to your device (i.e. track your location, tap calls, etc.), but I can only assume that they can only do these things if they know for sure that the device they are tracking belongs to you.
Let's say that you bought a brand new Android/iPhone and a PC/Mac. At what point is that device irrevocably linked to you as a person? When you put in a sim? If you download Instagram and log-in? Logging in to the app/play store? Adding the contacts of your family/friends? At the very moment you buy it (if you pay with card)???
For the sake of simplicity, let's assume that the people trying to link you to your device are super hi-tech government/hacker with lots of cash.