Airtable automations currently cannot include any branching logic without using a script. If your automation includes an email action, the email will send. Even adding logic in a script has limitations.
I tend to use an “email table” and have a script create a new record in that table only when an email should be sent.
Another option is to use a script to change who the email is sent to based on the number of records found. If there are no records, use a dummy email address and deal with the undelivered email messages.
I think many people simply include text that says if there are no records in the list to ignore the email.