Make sure your KMS server has been activated successfully.You can find the detailed instructions in the article KMS activation for Microsoft Office 2019/2016)
To deploy your own KMS server, you need to install the Volume Activation Services role on any of the hosts running Windows Server 2022, 2019, or 2016. Install Volume Activation Services Role on Windows Server