This game doesn't support Family Share on Steam, in case you have that on or use it to access a different account with the game in the library.

Did you purchase whatever the code came from, in the correct region, as these codes are region locked.
The code will need to match both the Steam account region and the Square Enix account region. If they don't match, you normally get that error you have.

Without knowing what you ordered and from which region and your accounts' regions we won't know exactly why you get that error.