Another Steam user gave me a Steam wallet code. Can my PC/Steam account get hacked by redeeming that code?
It is possible. One of the methods of account recovery is providing to the Steam support team a game key code or wallet funds code that has previously been redeemed on the account (as per here).
If you redeem the code then the scammer can provide that code to Steam support, as well as proof of purchase, and gain access to your account.