Permissions error connecting to docker -- User is a member of the docker group

I’ve installed docker on a new Arch desktop. I am not using docker desktop for Linux because it runs in a virtual machine which is not what I want. I have added my user to the docker group and logged out and back in but I continue to get the error:

docker: 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.

I’ve checked the ownership of the docker socket with stat /var/run/docker.sock --format '%u:%g The output is 0:972

When I check my own user groups with id --groups it says I’m a part of 1000 998 which corresponds to my personal user group and wheel. But if I use id -a rich it shows that I am a part of the docker group

uid=1000(rich) gid=1000(rich) groups=1000(rich),998(wheel),972(docker)

This also is so if I run getent group 972 which outputs docker:x:972:rich

Looking at the status of the docker service and docker socket they were both active and running but their default status was disabled. I enabled both and restarted my machine and now everything works again. You can mark this resolved.