The free upgrade from Windows 7 SP1 to Windows 10 ended long ago. That means you will have to buy Windows 10 and do a clean install.
However, Microsoft stopped selling Windows 10 on January 31, 2023, and by now, more than 3 years later, there is no place we can recommend to purchase a legitimate copy of Retail edition Windows 10.
Moreover, it seems senseless to spend the money and time to clean install an operating system that will lose all support in less than six months.
So in all honesty, there is no worthwhile solution for your question.