I think this is the issue. You should pass only the cluster name. So it should be something like myproject.random.mongodb.net, without all the other params. And make sure you do have a DB called mydb in your cluster, since I don’t see an env variable DATABASE_NAME.
That being said, I think it would be better to start a project with SQL DB, since Strapi no longer supports MongoDB, and version 3.6 has only a few months of support left. Personally I now have to rewrite my entire project from scratch to work with PostgreSQL and run on v4.