You are probably referring to fish shell which has this feature (https://fishshell.com/).

However, I find that zsh + ohmyzsh works just as well. After typing the beginning of a command you can use the arrow keys to cycle through all commands in the history with the same beginning.

A third method for efficient history search is ctrl+r. Just press ctr+r and start typing part of the command. Then you press enter to execute or ctr+r to cycle through the history.

oh-my-zsh is effectively unmaintained. That is not the worst thing in the world, but one may wish to consider prezto as an alternative:

https://github.com/sorin-ionescu/prezto