To update your legal name in the Microsoft certification system, you will need to contact Microsoft support. Your legal name must match the name on the government-issued ID you'll present at your exam appointment. If you've already registered for an exam, changing it requires Microsoft support approval.
Please ensure that you provide the correct name details when you reach out to them to avoid any issues on the day of your exam.
References: