how to prevent people enrolling for an event twice
Check if 'Same email address?' checkbox is ticked in Manage Event >> Configure Event >> Online Registration.

If this checkbox is enabled, CiviCRM will allow a user to register multiple times using the same email address.

Untick 'Same email address?' checkbox to prevent people from registering for the same event more than once.