The procedure is as follows: Backup, Update sources list, update packages accordingly, upgrade, followed by fullupgrade and reboot.
a) Backup the system.
b) Update existing packages and reboot
$ sudo apt update
c) Edit the file /etc/apt/sources.list and replace the content with the list attached below.
d) Update the packages index on Debian Linux now a second time and run:
$ sudo apt update
Note: In case you get an keyring error you need to add the keys for bullseye manuelly (or in your ansible, terraform, ...).
$ gpg --keyserver keyring.debian.org --recv-keys 0x648ACFD622F3D138
e) Prepare all packages for the operating system upgrade, run
$ sudo apt upgrade
f) Finally, update Debian 10 to Debian 11 bullseye by running a full upgrade
$ sudo apt full-upgrade
g) Reboot
$ sudo reboot now
h) Verify that everything is working correctly
$ uname -a
or use archey, and enjoy the ascii art
$ python3 -m pip install archey4; archey
deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main
deb http://deb.debian.org/debian-security/ bullseye-security main
deb-src http://deb.debian.org/debian-security/ bullseye-security main
deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main