The simplest solution would be to install Debian. The thing to note is that the Debian installer is designed to be multipurpose so it will default to installing a GUI.
Assuming you can boot off of a live USB with the Debian installer, you can follow the steps until you get to tasksel software selection from there uncheck gnome and check system utilities and ssh server. Also Debian defaults to separate root and user accounts. I would recommend disabling root (see steps below)
On a different machine, ssh into the server (I’m using debian.local but you should replace that with a hostname or IP)
Now you have a system to set things up. I would start by enabling automatic updates and installing docker compose. (Docker compose allows you to deploy software very quickly in co trainers via a yaml spec)