I am using macOS Monterey Version 12.4. The code in test.py is:
import pymongo
from pymongo import MongoClient
cluster = MongoClient("mongodb+srv://aarik:<i entered the correct password here>@cluster0.uyuc29f.mongodb.net/?retryWrites=true&w=majority")
db = cluster["testDatabase"]
collection = db["testName"]
post = {"_id": 0, "name": "aarik", "score": 5}
collection.insert_one(post)