Hello Ryan Ward,
Welcome to Microsoft Q&A forum.
Unfortunately, if a code has been redeemed, it cannot be transferred or use on another account.
In this case, if the code is a Microsoft balance or Xbox balance, you can use it and buy the game for your Xbox account as a gift. However, if the code is a game, you will need to use game share if possible.
Thank you for your understanding,