Not working with snap, but overall you have to move your NC 16 via all Major Versions. → 17 → 18 → 19 → 20 → 21. To do so, simply update your “channel” in snap and perform update:
As per Release strategy · nextcloud/nextcloud-snap Wiki · GitHub
sudo snap refresh nextcloud --channel=<channel>
# First will be 17
sudo snap refresh nextcloud --channel=17/stable
Update will do DB and some Apps update only. If you have small installation and no relevant data there (like share links, user settings), you can simply move data directory to newly installed NC with latest version and pre-configured users.