If you have a Steam Key for X4: Foundations, you can enter the product code in Steam to download it to your Library. To do this click the “+ Add Game” at the bottom left of the Steam window. In the menu that pops up, select “Activate a Product on Steam”. After agreeing to the Steam Subscriber Agreement, enter in the product code and click Next. If the code is valid, it will start downloading and become available in your Library.
Problems starting the game?: https://steamcommunity.com/app/392160/discussions/0/1744479698798322333/
Egosoft Technical Support for X4: Foundations: https://forum.egosoft.com/viewforum.php?f=180
Known issues: https://forum.egosoft.com/viewtopic.php?f=180&t=402386