Indeed, typing in “docker” at the Ubuntu 20.04 command line tells you the above “apt-get install docker.io” command; one does not even need to waste time with a 30 second Google/DuckDuckGo search.
(Learning Ubuntu since CentOS went broke their pinky promise to supply security updates until 2029)
my biggest complaint about ubuntu server is that docker is packaged as a snap. But that takes 30s to fix (includding googling for a fix :) )