As i know,Windows 7 is no longer supported by Microsoft,but i don't know more about Windows 8,it still seems to be supported by Microsoft.
It is found by me.
https://support.microsoft.com/en-us/windows/upgrade-to-windows-10-faq-cce52341-7943-594e-72ce-e1cf00382445
And there are still free ways...