Diana,
I use just two Zsh shell related files in my $HOME directory, and that content in your .profile is unnecessary:
- ~/.zshrc
- ~/.zshenv
I put Zsh shell functions in the ~/.zshenv file.
The assumption is that you have already run the following command in the Terminal to formally switch to the Zsh shell:
/usr/bin/chsh -s /bin/zsh
and you have not edited your current Terminal Profile Shell tab, leaving Run command blank.
If Apple provides Zsh 5.9 as the standard shell in macOS, why is your .profile referencing eval Zsh shellenv content in homebrew? Unnecessary and potentially the assassin of your Zsh shell.
Since your .zshrc is empty, you will need at minimum a revisable PATH and PS1 set. The following is a HERE document that creates a ~/.zshrc file with both of those environment variables set. Just copy and paste the following into your Terminal and then press return afterward. I have adjusted the PATH to reference the installed home brew binaries on Apple Silicon hardware. That leading dot means your current directory.
<<"EOF" > ~/.zshrc
export PATH=".:opt/homebrew/bin:${PATH}"
PS1="%m: %~ %% "
EOF
One you have run this HERE document, do the following in your Terminal:
source ~/.zshrc
to make those PATH and PS1 changes effective in the current Terminal session. In practice, I do not attempt to run any commands from within the tilde dot files (e.g. your mkdir command).
Can't help with MongoDB.