It sounds like you had 2 upgrades then. You originally had Vista and it was upgraded to Win10. You then had Win 8.1 and had it upgraded to Win 10.
In general in order to get the "free upgrade" you have to go back to the original OS and then upgrade again. So if you wanted to start with the Vista version you'd have to install Vista and then let it update. Same with Win 8.1 AFAIK you cannot just install Win10 because you will try to use an older Vista/8.1 license on the new OS.
Having said that, MS switched over to associating the license you use with your MS account. When you reinstall the OS you can skip the product key entry and after you log in with your MS account later it'll auto-license it. But I'm not sure if that was applicable to Win10 and whether it did that for upgrades or not.