How do I get shutdown codes using terminal in macOS
You can just enter the following command into Terminal:

log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 168h


The 168h refers to 168 hours, which I've used so that the command goes back a week (since you want to capture the weekend).

However, you can change the 168 to another value if you like.