Permission error while connecting to daemon

Although my username is added to the docker group, I get the permission error while running the hello world example.

$ groups mahmood
mahmood : mahmood adm cdrom sudo dip plugdev lpadmin lxd sambashare docker
$ sudo systemctl restart docker
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-02-14 23:11:44 CET; 3s ago
TriggeredBy: ● docker.socket
   Main PID: 196887 (dockerd)
$ docker run hello-world
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
$ ls -l /var/run/docker.sock
srw-rw---- 1 root docker 0 Feb 11 22:03 /var/run/docker.sock

May I know how to fix that?