Hi and thanks for reaching out. My name is William, I’m an Independent Advisor. I'll be happy to help you out today.
The event "The kernel power manager has initiated a shutdown transition." is expected. This simply indicates the computer has entered into a shutdown phase, usually a result of pressing the power button.
As for the issue with the laptop, it sounds like it went into sleep, and when you waked it from sleep (or it woke up on its own for any number of reason), you would need to unlock it and it likely resumed what it has been doing previously, playing videos on youtube. if you are curious as to what last woke your laptop if it was not you, you can run this command: powercfg -lastwake