Hi @ClaRissa M
A Microsoft Store game purchase is tied to the Microsoft account that completed the transaction, not to the laptop on which it was installed. Since you mentioned that your friend bought the game, please confirm whether your friend used your Microsoft account or their own account at the time of purchase.
If your friend’s account was used, the ownership cannot automatically be transferred to your account or your new PC. Your friend would need to sign in to the Microsoft Store with the purchasing account, although sharing account credentials is not recommended.
If the purchase was definitely completed using your account, make sure the Microsoft Store and the Xbox app are both signed in with that same account, then check My Library in the Microsoft Store and My Library > Owned games in the Xbox app. If the game is missing from both places, Microsoft Support will need the purchase receipt or confirmation email to trace the license. Please do not post any order or payment details publicly.
Please note that this is a user-to-user support forum. Moderators and contributors cannot access accounts or Microsoft’s back-end systems. We can only provide technical guidance on reported incidents, requests and ideas
Thank you for your time and have a nice day!