How to know the author of HA reboot?

Refer to the table in the following post:

Unless the triggering source was via the UI, the value of user_id is normally null (none).

Also, are you certain that the trigger object produced by a Homeassistant Trigger contains an event property?

trigger.event.context.user_id
        ^^^^^