Download the installation package from the official website https://store.docker.com/editions/community/docker-ce-desktop-mac
Just install it as normal
It can also be installed using homebrew
brew cask install docker
Test it with the following command
sudo docker run hello-world
The first execution may encounter
do it again