I have been away from the RPi scene for a while, but I'd be surprised if you could not do a "distribution" update which involves ensuring the current (major release number) version on your RPi is fully updated before editing the sources to change it to the next one and then updating to that.
For example the later part of https://phoenixnap.com/kb/update-raspberry-pi details this for upgrading from Stretch to Buster, but the process to go from Buster to Bullseye should be the same except you have to juggle the names used (where "stretch" was referred to, you use "buster" and where "buster" was used you need to have "bullseye").
One thing to watch out for is that
apt-get is no longer the command to use for command line work and instead using
apt directly is recommended. Whilst https://phoenixnap.com/kb/apt-vs-apt-get gives some of the details it seems to omit one gotcha that can occur when you have changed the release name in the sources, e.g. as mentioned in update problem with apt-get after new install of OS.
apt-get will moan about the new version not being explicitly accepted and requiring you to approve the update with
apt-secure - whereas
apt (in all the cases I have encounter this on Desktop Linux machines) will accept the change and get on with it.
One point the other existing answers don't seem to have noted about just getting a whole new distribution image and replacing the existing one is that that will also discard anything else that you might have configured/built/installed on the existing installation. If you can backup so that you replace such stuff into the new OS then that may indeed be the easier (and probably quicker way to go) - but upgrading in-place can be desirable to continue with a system that the RPi is incorporated in and which it has been locally configured to work for.
Raspberry Pi OS Bullseye | Every model Pi
Raspberry Pi OS Buster | Every model Pi