This is on you. You prepare your computer ahead of time. Do updates the night before, check if everything works. You also have an empty battery?
Like I loathe windows as much as anyone, but this would never ever happen to me. I triple check it all, especially if it runs windows.