Download on PC

I bought a code for halo wars 2, input it where it needed to go and it says that i own the game but i dont know how to download it on the computer. When i try hitting play at the store it brings me a pop-up saying i need to buy it again. It’s in my library and everything but i dont know how to install it. Help?