I just did this last month on my brothers newish laptop. Windows 10 uses Digital Entitlement so I used my W10 USB install stick that I created with (google this) the Microsoft Media Creation Kit.
After the new SSD was installed I booted the stick and installed W10, then off to get drivers and a few machine specific apps.
Of course if you are not into driver and app work, order the recovery media for your PC.
A year or two back I was having issues with my computer, probably viruses, so I attempted to factory reset (windows 10). It was stuck at 0% for about a week, and then it randomly shut down. When I tried to start it again it looked like it would boot normally but an error popped up saying something along the lines of "windows 10 was missing" or something. Today I put it back together and tried to boot it. So far no error sign but I's been booting for about 10 mins. One thing I was wondering is if It would be possible to buy a new hard drive, install windows on it using a friend's computer, and then replacing the current hdd with the new hdd.
For reference, I'm pretty sure the computer is this one https://www.walmart.com/ip/HP-Black-17-3-17-p120wm-Laptop-PC-with-AMD-A8-7050-Dual-Core-Processor-4GB-Memory-750GB-Hard-Drive-and-Windows-10-Home/46429954
It doesn't have a name, so I'm not 100% sure if this is the right one, but the specs seem to match.