I need to replace completely broken hard drive, but what about the operating system?

kate64100

Prominent
Oct 11, 2017
1
0
510
So, my laptop broke a few months ago, as in the hard drive just went dead. The data is unrecoverable, nothing can be done.
Finally, I thought that I could do a little fun project that is to change the hard drive and maybe make the laptop work again.
And while everything is clear about that, I wonder what about the operating system? It was a relatively new laptop and Windows 10, although bought with Windows 8, so that came already installed, which means I've got no copy of the system.
So what now? What happens in such a situation when the windows/hard drive dies and there's nothing to get a copy off?