The easy way is to disable the display manager.
In case of Gnome disable gdm
sudo systemctl disable gdm
In my vocabulary and understanding of the headless definition - is a system you access over network - a system where you do not visually or physically interact with the hardware.
It does not imply it cannot be used on-site physically/visually - as it could easily be a rpi sitting next to you on the desktop.
While the following has been written using a rpi - the principles used applies to non rpi as well