All of these steps are completed on a fresh install of Debian 12 without GUI. Include SSH server during installation.
For this example, my domain will be samba.lan, my domain controller is dc1.samba.lan and the IP address is 192.168.122.190
During the Debain 12 setup, go ahead and name your server dc1
For domain, go ahead and put in samba.lan
After install, confirm you have internet and DNS working. Go ahead and apt update and install any pending updates.