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

Docker is a containerization tool, and its artifacts (such as images and containers) are primarily designed for Linux-based operating systems because they rely on Linux kernel features. Since Windows does not natively include a Linux kernel, running Docker containers on Windows typically requires Docker Desktop, which uses a lightweight virtual machine to provide a Linux environment. This is why the Docker command line works in conjunction with Docker Desktop on Windows.