The fact that I can see your mongo uri in the sample env file probably tells me you are not using the secrets tab in replit.
Remember that you do no want to expose your secret keys to everyone.
That is why we use env variables to keep that sensitive information secret.
You need to delete your mongo uri out of the sample env file and add your uri to the secrets tab.
On the far left hand side of replit you should see a padlock icon.
Click on that to add your mongo uri.