I cannot see that you have posted any error unless I have missed it. Can you provide the following information:
The full error message
If you’ve been able to connect previously
Driver version
(Optional but could help with troubleshooting) - If you have attempted to connect from the same client using mongosh or MongoDB Compass (you’ll need to select Deployment Type: cloud and Client: shell or Client: compass for the corresponding connection guides).