I am using the same python version that I am using on local, that is, 3.8.9 and have also installed all the dependancies by generating a requirements file using pip freeze command.
The error seems to indicate that there is something wrong with the credentials that are being passed into MongoClient when it is instantiated. Can you verify that all of those values are identical between the environments? It also looks like IP access restrictions are required to use MongoDB Atlas. Have you configured this to allow your Render service to access your database? Render services don’t have a static IPs to allow, but we have many customers using QuotaGuard when a static IP is required.