Hello,
Open CMD as administrator, then paste the following commands:
slmgr.vbs /ckms
slmgr.vbs /upk
If you’ve already assigned the Microsoft 365 E5 license to your user account in Microsoft 365 admin center, you might need to wait for a while as it may take up to 24 hours for the license status to update in the backend.
In the meantime, please make sure that you’ve joined your device to Azure AD and login with the same user account that has the M365 E5 license assigned to it.
If still could not activate, I suggest that contact Microsoft 365 subscription activation support to check the key.
Best Regards,
Hania Lian
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.