Monitor Windows logs on event ID

I’m trying to do the same, and copied the above, and not getting any luck. Any steps that might be missing from the stated above?