It does stop some classes of hacks, ups the effort considerably as you hack needs to be in kernel or with hardware. But its pretty much impossible to stop on x86/windows PCs.
And CS is completely overrun with cheaters. I don't play Dota like games but afaik they all have effective obfuscation, so ESP/wallhack like cheats aren't effective. But they have some auto aim cheats for abilities.
I don't know if CS2 is any different but while CSGO didn't have a cheater in every single game it was at least 1-2 in 10 in ranked games at global elite level from my experience playing it on and off for many years (beta 0.6 to a few years ago). At that level they usually only use ESP/wallhack and toggle aim assist to avoid getting banned through overwatch. Was very common for them to toggle halfway through a game or so to avoid losing or if they think someone else is cheating.
Depends on your definition of overrun, I did use it a bit hyperbolically, but it seems you have no idea what you're talking about.
Everybody is "doing something". It's a question of what is something. Account-banning people after proven cheating is also something. I would imagine a competitive game with a skill-based match-making, especially a successful one can do that.
Asking people to swear to not cheat in ToS is also something. Only installing the game on the proper trusted computing or doing server-side anticheat is something too.
The issue is with the company deciding to disregard customers concerns about security and privacy to get this something for cheap from a third-party vendor.