Search for people who have NOT registered for an event using a custom search or data processor
SELECT cc.id, cp.id
FROM civicrm_contact cc 
LEFT JOIN civicrm_participant cp ON cc.id = cp.contact_id AND cp.event_id = 1 WHERE cp.id IS NULL;

You can confirm that this works by running this straightforward query to see the contacts who ARE registered for an event:
SELECT cc.id, cp.id 
FROM civicrm_contact cc 
LEFT JOIN civicrm_participant cp ON cc.id = cp.contact_id 
WHERE cp.event_id = 1;

Then confirm that this query is functionally the same:
SELECT cc.id, cp.id
FROM civicrm_contact cc 
LEFT JOIN civicrm_participant cp ON cc.id = cp.contact_id AND cp.event_id = 1 WHERE cp.id IS NOT NULL;

The first query is the same as the third, except uses IS NULL instead of IS NOT NULL.
This search should be possible with the forthcoming Search Kit.  I tried a pre-release version but there was an error joining contacts to participants.  However, I was able to create the equivalent with contributions - &quot;All contacts without a member dues payment&quot;.  The screenshot below shows how you'll be able to do this with Search Kit very soon: