Your question can refer to more than one scenario -
Scenario 1:
If you use a third party email address to sign into your account, and this email address is no longer valid and you cannot get the 2FA verification code, as long as you have the correct number, sign into https://account.live.com, when prompted for the 2FA code, look for an option like “Show more verification methods” to see if you have a backup (e.g., a phone number or alternate email).
If you don’t have access to any of the options listed, select “I don’t have any of these.” This will begin the recovery process. As part of that process, Microsoft will let you add new contact information — but only after a 30-day waiting period.
This 30-day delay is intentional. It’s a security safeguard designed to protect users in case someone else tries to hijack their account by changing recovery info. The wait gives the rightful owner time to notice and stop unauthorized changes.
Unfortunately, this policy cannot be bypassed. Microsoft explains it further here.
======================
Scenario 2:
If you mean you have an hotmail.com or outlook.com address, and it has been closed and you can no longer sign into Windows using that account, then that's a different story.
Create a new Microsoft account, and on your computer, can you still sign in using PIN?
If so, once you sign in,
- Type netplwiz in the search on the taskbar and hit enter. When launched, click on "Add". Go ahead and sign into the new Microsoft account.
- When the above user is created, back to the main netplwiz page, double click on this new user, go to the Group Membership tab, make it administrator. Save the change.
- Restart the computer. Sign into the new user you created in Step 1.
- If you have data at the old username folder, go to C:\users\old username folder, find them and copy them into C:\users\new username folder.
- Type sysdm.cpl in the search on the taskbar and hit enter, go to Advanced tab, click on the "Settings" button at the User Profile section. Then delete the old user profile.
- Launch netplwiz again, delete the old user from there.