Docker only works in command line when Docker Desktop is open (WSL)

I am pretty new to Docker and noticed that I can only run ‘docker run hello-world’ in the Ubuntu terminal when I have previously opened Docker Desktop on Windows. Am I missing something, or is this intended behavior? In the Docker Desktop settings, WSL integration is checked. When running the command without Docker Desktop being opened, it returns:

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

In /etc/wsl.conf I added:

[boot]
command="service docker start"

Docker version 26.1.0, build 9714adc
Microsoft Windows [Version 10.0.22631.3447]
Ubuntu-24.04