Here’s the breakdown of it if you want to know what it does:
This updates the package list and upgrades the packages on your Raspberry Pi.
This downloads the Docker installation script which is present at https://get.docker.com ↗️ and runs it with root privileges.
Note: Always check the script before running it with root privileges.
This adds the current user to the docker group so you don’t have to use sudo every time you run docker.
You can also checkout the official documentation for installing Docker on Raspberry Pi at https://docs.docker.com/engine/install/raspberry-pi-os/ ↗️