cat /etc/os-release
lsb_release -a # if installed
uname -r # kernel
hostnamectl
A release upgrade (for example one Debian stable to the next) is done from the previous release's fully updated state: update and upgrade first, back up, read the official release notes, change the codename in the apt sources, then run apt update, apt upgrade --without-new-pkgs and apt full-upgrade, and reboot. Do it on a test copy or with a snapshot first. Never skip a release. For a server, a fresh install plus restoring configuration from a backup is often safer than an in-place upgrade.