Just because your cox.net is discontinued, it doesn't mean you need a completely different Microsoft account. You can just switch out the alias/username for the account, and update the security contact information as well.
Can you please confirm if that's what you did, that you created a brand new Msft account with the gmail address?
You can also use this method to get back into your old Msft account, when you try to sign in, if it is asking for the code sent to cox.net, 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.