Thank you for posting Question here,
Please find details below. You may have to remove your old device from here https://account.microsoft.com/services
And then you can login on macbook.
Once you install then just login using register email address.
please let me know how it goes.
If you found this answer helpful, please click "Accept Answer" and consider giving it an upvote it helps others who might have the same question in the future.