I had the same sort of situation with a HP desktop my in laws gave me. They never used it and it's an i7 beast. It came with W7 home but I wanted to install an SSD drive as the machine was a mess from to many grandchildren messing about.
HP like Dell offers you a W7 install CD but wanted $50? I have a crack of W7 and so I desided to go that route as after all, the machine had a paid for licence but was locked to the old HD partition. No guilt.
But as said above the W7 initial install was easy,,, but- it took days and and days to update. It became stupid. And I had driver issues and the USB 3 ports and the SD card reader etc did not have any.
So I gave up and desided I would just buy W10 and be done with it. This was the Fall after the free deadline. But right on the MS web site they tell you how to get W10 for free and so I did that. So any how
You can try the W7 install and because you do have the proper install software you might not have the trouble I had with the drivers.
But I was going to tell you if you have to buy an new OS I agree that W 8.1 is what I would choose.
You can still get W10 for free. looks like it's finally going to expire year end.
https://www.cnet.com/how-to/microsoft-windows-10-free-upgrade-offer-assistive-features/