1. Redeeming a Code via GOG Website
Go to https://www.gog.com/redeem.
Sign in with your GOG account.
Enter your code in the field provided.
Click Continue.
The game will be added to your GOG library and available for download.
2. Redeeming a Code via GOG Galaxy Client
Open the GOG Galaxy client.
Sign in with your GOG account.
Click the Settings (gear) icon in the top-left corner.
Select Add games & friends → Redeem GOG code.
Enter your product key and confirm. The game will be added to your library.