What tool do I need to install to make my terminal show the autocompletion of the command that I'm writing?

Kali uses zsh instead of bash as the default shell and the feature you are referring to is called autosuggestions.

Before you begin, you will need to set up zsh if you haven't already.

Run the following to install zsh and follow the instructions when prompted (it's best to accept the defaults and auto-generate your zshrc file):

sudo add-apt-repository universe
sudo apt update
sudo apt install zsh zsh-syntax-highlighting
zsh

For 20.04, run the following command to install the zsh-autosuggestions package:

sudo apt update
sudo apt install zsh-autosuggestions

For Ubuntu 18.04, you can run the following commands to install the zsh-autosuggestions repository Keep in mind that the owner of the key may distribute updates, packages and repositories that your system will trust (more information):

echo 'deb http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_18.04/ /' | sudo tee /etc/apt/sources.list.d/shells:zsh-users:zsh-autosuggestions.list
curl -fsSL https://download.opensuse.org/repositories/shells:zsh-users:zsh-autosuggestions/xUbuntu_18.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_zsh-users_zsh-autosuggestions.gpg > /dev/null
sudo apt update
sudo apt install zsh-autosuggestions

Finally, run the following commands to add autosuggestions to your zshrc file:

cp ~/.zshrc ~/.zshrcbackup
echo "source $(dpkg -L zsh-autosuggestions | grep 'zsh$')" | tee -a ~/.zshrc
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" | tee -a ~/.zshrc

and don't forget to source your ~/.zshrc file to apply the changes (if you are in bash or another shell, run the zsh command first):

source ~/.zshrc

See here if you want to make zsh the default shell.

Run the following command to search for other plugins, plugin managers, related packages (like fuzzyfinder), and other compatible shells:

apt-cache search zsh