Generally speaking, you're best off using official channels for any video game purchases. There are exceptions when it comes to delisting and preservation and whatnot, but the simple fact is Steam, GOG, and others protect your investment more than third-party resellers, and one indie dev is reminding people of that by deactivating illegitimately gotten copies of their game.
The repair shop sim ReStory: Chill Electronics Repairs managed to shift 300,000 copies in its first week. An incredible result for a small team, but it's been tainted slightly because a small percentage of them have been blocked by publisher tinyBuild because they were ill-gotten keys.