Problem scenario
You unlocked the desktop of your Mac laptop. How do you find out the time that it happened? Or you just want a history of the times you logged into your MacOS, what should you do?
Solution
Open the command prompt.
Run this:
log show --style syslog --predicate 'process == "loginwindow"' --debug --info | grep "SecKeychainLogin result: 0, password was supplied"
The answer was taken from https://apple.stackexchange.com/a/332226