Hello
If you have the code, you can follow the instruction here to redeem your code first: https://support.microsoft.com/en-us/office/where-to-enter-your-office-product-key-0a82e5ae-739e-4b92-a6f4-2ec780c185db
That will then associate your purchase with your Microsoft account, so moving forward, you don't need the code anymore, you just use your Microsoft account to activate.
To install after the above, Please go to https://www.office.com
Sign into the Microsoft account you used for redemption. Then click on Apps on the left.
Then on the upper right, click on "Install apps". This will now download the installer file. Once downloaded, click on the file to install. It will install the Desktop version of the apps for you then.