raspberry pi boot without HDMI
1. /boot/config.txt hdmi_force_hotplug=1
2. startx if use remote desktop
You have 2 options:-
Boot to console.
Force HDMI
Uncomment the below line in the file /boot/config.txt:
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
The latter probably requires a default resolution to be set in raspi-config (at least on the Pi4 - earlier models defaulted to VGA resolution).
If you are not planning to use VNC the first is preferable - you can always start GUI manually with startx when required if a monitor is attached.
My Pi boot headless with or without monitor.