I have a pirate windows 7 on my laptop and I want to install a legit windows 10 how do I do it

Solution
Either buy a copy of Win10 or buy a copy of Win7 and upgrade for free.

Or you can try activating your current bootlegged copy and accept the offer to buy a license. Then you can upgrade to Win10 for free.