Cheaters: Prevent them or catch them?

Each of my kids has forgotten to bring a book or notes to open-book, open-notes exams at least once, and missed enough of the “copy out of the book” questions to lower their grade substantially. But, that is one solution.

For STEM classes they were sometimes permitted to bring in a cheat sheet of formulae that they made up themselves before the exam, sometimes limited to the size of an index card, sometimes on a sheet of paper.

I am not sure how access to another human being can be blocked if students retain access to electronics, though.