You don't need to run that SOQL query at all. All of the data you need is already present in the records in Trigger.new. Further, you likely don't need to be running this after insert and incurring the overhead of another DML operation.
Instead, run the trigger before insert, iterate over Trigger.new, and apply your logic via a simple if statement.
As to ...
As Kurunve suggested it is indeed possible to do this with a platform event with "publish immediately" option and a process builder.
Create a platform event and some custom fields that you'll need to create a task or whatever object you need.
In the lead trigger before you do .addError() publish your platform event. It can look something along these lines: