The toxicity in this game is as frequent as most other modern titles. What is different compared to lets say LoL or Valorant is that those games have a MUCH bigger playerbase so whilst you will encounter toxic people frequently, its incredibly rare to come against the same person twice in a single night, or even ever again. Plus these games have quick tools to mute or block them, preventing you from ever having to deal with them in the future.
TF2, comp TF2 especially so, does not have this luxury. Its very likely that you'll remember one or two individuals who really ruined your day and unless they get banned or you actively avoid them its inevitable that you'll see them again. The impact one person has on a players experience in comp play is far higher than in other games. Even worse are these circlejerks these people find which form groups big enough that you're always going to encounter someone from them at some point, which is especially bad if you are someone they've labelled as someone to target specifically.
Yet, that same system allows you to find groups or communities that are the complete opposite. Leagues or platforms have large power to prevent such individuals from competing on their sites, which by proxy can outright ban them from taking part in competitive play. So whilst each individual has more impact, they have more accountability. Ultimately its not a matter that TF2 is more toxic than other games, but rather about those you surround yourself with.