I created .zshenv profile since after mac os 13, it is unable to read ANDROID_HOME and ANDROID_SDK_ROOT values from bash profile. So, copy all .bash_profile values in .zshenv profile. Also, add below statement to .zshenv profile. export ANDROID_SDK_ROOT=$ANDROID_HOME
After that, restart your intellij, android studio and terminal.