Linked MBP to my account even after erase I have to send my MacBook Pro M1 back to Apple as a replacement. I tried to format it but it didn't work (I think)(I used disk utility and erased Macintosh HD) as it still shows the activation screen and my email address linked to it. How do I unlink it from my account?
I tried using iCloud but I see the following screen which is my old email address and it won't let me type in my new email address.
First things first, the reason your MacBook Pro is still linked to your Apple ID is because you need to sign out of iCloud on that device. Reformatting the hard drive is not enough.
The What to do before you sell, give away, or trade in your Mac page on Apple's website provides a good summary of what users should do.
As for the screen in your screenshot, it's not letting you change the &quot;email address&quot; because it's actually prompting you to enter the password for the Apple ID (in this case, the Apple ID being the same as your old email address). The fact that it's an old email address is irrelevant, as it's still an Apple ID attached to you.
All you need to do is enter the password for that Apple ID to access iCloud etc.
If the Apple ID you used with that MacBook Pro was in fact another Apple ID, then you'll need to log into that iCloud account instead.
NOTE: Assuming your MacBook Pro has a fresh installation of macOS, you could just go into System Preferences to log out of iCloud etc. and that should disassociate that Mac from your Apple ID.