Error - load metadata for docker.io/library/python

I’m a newbie to Docker and trying to build a simple python docker image; however, I’m running into the below error while trying to build the image.

=> ERROR [internal] load metadata for docker.io/ library/ python:3.8-slim 3.4s
** => [auth] library/python:pull token for registry-1.docker.io 0.0s**
------

------
**failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: Get **

Any help is highly appreciated.
Thank you in advance.