Thats literally the point of anticheats. To figure out how to detect.
First you need to understand how cheats work. The simplest thing to do is read the player's hooks. But obviously every cheat since 2012 has hook detours You can also look at concommands, but same thing as before. You can try to screengrab, but same thing as before. There's render.Capture detours You need to understand in depth how cheats work in order to make an anticheat, and they are a lot of work. Thats my recommendation. Learn to cheat before you can learn to prevent it.
or if ur just asking about a small server, theres always sv_allowcslua 0, but thats not going to stop a single person, just the children good luck mang