The most straightforward installation method for Linux, Windows, and MacOS platforms is to install Docker Desktop. Docker Desktop includes the Docker Enginer, Docker CLI and Docker Compose.
An alternative method that works for Ubuntu (and other Linux platforms) is through the Docker repository. The Docker Engine and the Docker Compose packages are to be installed separately.
Post install instructions are also important to follow for convenience: