Ubuntu & Raspberry Pi OS
Two solid choices for the same hardware, and picking between them is really about what the board's job is.
Raspberry Pi OS
Debian-based, tuned specifically for Pi hardware, with the broadest GPIO and camera library support. The default choice for anything that touches the board's own hardware directly.
Ubuntu Server
Heavier, but a more standard base when a project is likely to move between a Pi and a regular VM or cloud box later — same package set, same systemd behaviour either way.
Headless setup, done once properly
Both images support dropping an empty ssh file (or a userconf.txt/cloud-init config) onto the boot partition before first boot, so there's never a need to attach a keyboard and monitor just to get a Pi onto the network.
# Raspberry Pi OS: enable SSH before first boot
touch /boot/ssh
# Ubuntu: set hostname + wifi via cloud-init before first boot
# edit /boot/network-config and /boot/user-data
Keeping it boring
The habits that save the most time later are unglamorous: a static DHCP reservation per board so it's always reachable at the same address, unattended security updates turned on, and a known-good SD card image kept to one side before anything risky gets attempted.