Run the following commands in a terminal window
# clean apt cache
sudo apt clean
# update apt repositories from bullseye to bookworm
find /etc/apt -type f -name "*.list" -print0 | xargs -0 sudo sed -i.bak "s/bullseye/bookworm/g"
# add optional non-free repos
echo "deb https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list
# update software repositories
sudo apt update
# install software updates
sudo apt dist-upgrade -y
# remove unnecessary packages
sudo apt autoremove -y
# clean apt cache
sudo apt clean
# reboot
sudo reboot now