You should look at the MariaDB error log. The authoritative documentation on this is found in the MariaDB Knowledgebase: Error Log.
If you're using Ubuntu, then I assume you have systemd, which means you can also see the error log with:
journalctl -u mariadb.service
... although I personally don't think this is as good/nice as MariaDB's own error log file. ...
In the trigger, change
IF NEW.delivery_date = ""
IF NEW.delivery_date < '1971-01-01'
That will catch empty string and '1970-01-01' and any timezone variation on that "zero" date. It will fail if it is already NULL`, but that won't change the action of the Trigger.
(In the future, be sure to include any relevant Triggers in the ...