Quick instructions for compling ZSH from source. Note that this is essentially just download/configure/make/make install.

Look in https://www.zsh.org/pub/ for the most recent version if 5.8 is not the version you're looking for.

cd /usr/src
wget https://www.zsh.org/pub/zsh-5.8.tar.xz
xz -d zsh-5.8.tar.xz
tar xvf zsh-5.8.tar

./configure && make
sudo make install

This will install the new version of zsh to /usr/local/bin/zsh so that it does not interfere with the system zsh package.

Once installed, add it to your /etc/shells file and then make it the default shell for your user by running chsh /usr/local/bin/zsh. Make sure you run /usr/local/bin/zsh first to ensure the shell actually loads and works before switching to it.