Install Domain Controller on Microsoft Windows Server
Before you install the Domain Controller, ensure that the host has a static IP address and then configure the Preferred DNS Server at that static IP address.
See Microsoft documentation for instructions on installing Domain Controller on Microsoft Windows Server.