In the later, we were given harder exercises and asked to deliver a working program with some constraints. This program is then tested and graded by a CI and examined by TAs. Usually TAs would get a cheating report for reused bits of code and things that would solve an exercise with techniques far away from students knowledge or forbidden functions. TAs would ask you questions about your code and trigger cheating review if you could not explain why you wrote it this way. It was usually effective for detecting people that didn't wrote their own exercises. As the exercises were harder than expected for a class and projects were long and difficult, students were encouraged to talk, discuss and exchange ideas. Ideas sure, code meh.
Then, in the US, exercises were stupid checkboxes-style questions and graded on a curve. So of course everyone "cheated".. I must confess that I did it too. It was unworthy of my time and attention, as it was just about taking the course material and regurgitate it with different words. Of course, I can't imagine anyone learning anything from this way of working.
Stupid assignments encourage students to cheat. Make them interesting and this problem will go away.