So apt update && apt dist-upgrade
Then Zammad updates all things to the latest version. Why you want to install 4.0 first?
Because Michael read the documentation and wants to follow the upgrade path:
You can adjust the repository file to achieve your goal or list the available packages in the current repo you’re looking at (that’s the easier part). In apt speech you’d say
apt-cache policy zammad which lists all non local available versions / installations candidates in that repo.
You can pick out the correct version and then install the specific version you need.