It's almost like Tor was developed by the U.S military or something. Wow! It was literally compromised during the Arab Spring and there are documents on WikiLeaks detailing that but why listen to them? They OPPOSE censorship after all. Then again, the Farms manually collects browser fingerprints and saves them for god knows how long but they're sooooooo privacy concerned despite browser fingerprints having far more data in it than an IP and a good bit of that meta data can be used to track you down, more so than an IP ever could.
Tor is arguably the best browser to use for anonymous web surfing. It's used by journalists, government agencies fighting hostile foreign powers, people escaping abusive relationships, people escaping from the control of hostile entities (such as gangs, drug cartels, or terrorist groups), and people living under an oppressive government so they can have access to the outside world but it's no magic bullet.
Let's look at some ways on how Tor users get caught:
1. Network eavesdropping, The feds may set up bad exit nodes in the hopes of catching users that are accessing and using illegal services on the darknet. This way the glowies may end up identifying some Tor users because end relays are not encrypted after they leave an exit node and access a hidden service. This is one way on how the feds may find you. To mitigate this, connect to an HTTPS connection when possible, give out little information about yourself when possible, use anonymous services that don't collect any information about you, and maybe use a decent VPN based outside of the 'Five Eyes of Surveillance' (bonus points if they accept crypto as payment such as Monero).
2. Any hidden service that exclusively use Bitcoin. If a hidden service only wants you to pay in Bitcoin then it's likely a honeypot because while Bitcoin is anonymous, it's not private as the blockchain is open to the public. Glowie-sponsored tech companies (like Chainalysis) do heavily monitor the blockchain for various popular cryptocurrencies because most cryptocurrencies have their blockchains open to the public. If you are going to buy or sell anything on the darknet, use Monero instead because Monero is designed to be private. If a hidden service also accepts Monero then chances are it's legit and it's not a honeypot (do proceed with caution when buying or selling anything on the darknet though).
3. Criminals on the Tor network that talk too much. Tor works pretty well in hiding you from prying eyes. But Tor doesn't stop people from talking too much because no privacy software in the world will prevent a criminal from singing like a canary. The term "Loose Lips, Sink Ships" is a term coined by the U.S. Navy because anyone blabbing about secret military plans in public means it's very likely said enemy countries will learn of such secrets to have an advantage. Ross Ulbricht (the founder of The Silk Road) got caught mostly because he kept talking too much and he was an open book both on the clearnet and on the darknet. So if you are going to commit any crimes on the darknet (or on the Internet in general), shut the fuck up and always assume that you are talking to a fed because anything you say can and will be used against you in a court of law. It's actually rare that the feds will use some Criminal Minds/CSI Miami shit to find you. Often times, the criminals on the Tor network that end up getting caught simply talk too much where the feds can use this to put two and two together to identify their suspects. Remember your 5th Amendment rights and shut the fuck up.
4. Criminals that don't know when to leave the game. The darkweb admins that do get away with their crimes only get away with it because they are only in it in the short-term and they don't plan to stick around. The vast majority of darknet drug marketplaces actually get away with their crimes because they know they're playing a game with the feds that they are far less likely to win because the feds play a world-wide game of 'Guess Who' to identify any darkweb admins committing crimes and the feds have access to much more resources at their disposal in their investigations while the average Joe is very limited to what they have. The only winning rule is knowing when to leave the game before the feds find more evidence that can lead to your real world identity. The vast majority of darknet drug marketplaces only open up shop for a year or two and then they voluntarily close up shop once they made enough money because they know they can't stay in the game forever and it's best to disappear with their ill-gotten gains before the feds find them. So be like Snagglepuss and know when to exit stage left/right before the feds gather more information that can lead to your current whereabouts.
5. Criminals using anything that has backdoors. The dumbest criminals will use something like Windows or Mac to browse the Tor network where the feds already have backdoors in these two operating systems when they should've used a good Linux distro instead. Anything propitiatory and closed-source is likely going to have backdoors so the glowies can spy on you. So when possible, use open-source alternatives instead (Linux distros like TailsOS, Qubes, and Whonix are really good at hiding you and consider using custom Android roms like GrapheneOS, LineageOS, or CalyxOS for your phone).
Let's review on how not to get caught by the glowies. Protect yourself from potential bad Tor exit nodes, use privacy-based cryptocurrencies like Monero when possible, shut the fuck up, know when to exit the stage, and use open-source alternatives instead.