Zend certified PHP/Magento developer

Up Down Arrows keys to scroll history on ZSH is not working

I am on macOS (12.3.1 Montrey) and I use ZSH.

When I press UP Arrow on my terminal/iTerm, it gives me an “alert” sound and then I would have to press it again to go to the previous command. It is like I would have to press my “UP” arrow twice.

I just want to scroll through the history of all the commands I have typed.

#export ZSH="$HOME/.oh-my-zsh"

Commenting the above line, fixes the problem and “up” and “down” arrows work fine. But I want other plugins with oh-my-zsh. How can I fix this?