I understand this is because of the new LaTeX update that inter alia changed the
AtBeginDocument hook to integrate it into a more systematic hook scheme.
So I suspect one of the very numerous packages I am using is not (yet) compatible. I reverted to an earlier version of LaTeX as suggested in this answer (also had to revert eso-pic).
How can I pinpoint which package(s) is at fault ? This seems hard to me because the faulty constructions are added to the hook and everything explodes at
How can I inspect the content of what is to be done at that point and what should I look for ? I used to use
\show to explore what is going on, often needing a
\makeatletter to get to internal commands, but now the internals of
\UseOneTimeHook are in the new syntax eg.
\hook_use_one:n and I cannot
\show it at the latex prompt.