Errors when installing docker on server

Hi, trying to install docker on an ubuntu server. Following this guide: Install Docker Engine on Ubuntu | Docker Docs

Can anyone help with the error?

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

apt-upgrade results in the following

Hit:1 http://ftp.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Ign:3 https://download.docker.com/linux/ubuntu bookworm InRelease
Err:4 https://download.docker.com/linux/ubuntu bookworm Release
  404  Not Found [IP: 18.165.171.38 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu bookworm Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list:1 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list:1 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list:1 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list:1 and /etc/apt/sources.list.d/docker.list:1
W: Target DEP-11 (stable/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list:1 and /etc/apt/sources.list.d/docker.list:1
W: Target DEP-11 (stable/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list:1 and /etc/apt/sources.list.d/docker.list:1

Did you run apt-get update as it is mention in the last line after ading the repository? And why do you run apt upgrade? Don’t you just want to install Docker CE? That doesn’t require upgrading your whole debian distro.

Of course, if you never used Docker on this machine before, the repository would be unknown without running apt update, which is not the case