If you want to try the game before buying, there are legitimate ways to do so:

You support the developers directly (they get 100% of the money, unlike the 70-80% on Steam), and you still get to add the game to your Steam library.

While the internet is filled with "key generators" that are simply scams or phishing attempts, there are legitimate ways to get Factorio without paying at the moment of acquisition, or by utilizing official, legal methods.