Am not able to install docker in centos 7.9

service docker status
Redirecting to /bin/systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d
Active: inactive (dead)

while restarting the docker service then am gettting the below error
service docker start
Redirecting to /bin/systemctl start docker.service
Failed to start docker.service: Unit not found.

How did you install Docker? It looks like a dependency is missing. It works on my CentOS server. I followed the official documentation.