You can install all (or almost all) prior Ubuntu Wallpapers release (or older wallpapers than your current system, ie. 23.04 can have all prior releases, as can 22.04 - but 22.04 won't get 22.10 or 23.04 as they're newer than the release being ran). You can also install other flavors, eg. install Xubuntu wallpapers, Ubuntu-MATE etc too, however not all flavors have all prior releases available (eg. Lubuntu keep only specific images; some flavors keep only LTS releases etc).
eg. if you scroll through this list
https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&keywords=wallpapers-focal&searchon=names
you'll quickly see ubuntu-wallpapers-focal
pacakged for all later releases, as well as other flavors of Ubuntu too.
Depending on your setup, when you release-upgrade to a newer release, you may remain on the same wallpaper OR auto-change to the newer wallpaper of your newer release. It'll depend on your settings (inc. did you change anything; if you didn't it's more likely to auto-upgrade to the newer wallpaper for most flavors).
In most cases, your prior wallpapers will still exist on your local system anyway, so changing to it will undo the upgraded change (this will match the other already provided answer) but there are cases where this will not occur too. I've focused this answer on how to re-install if you're unlucky and they didn't survive, or for later readers who remember an older wallpaper they don't have due to later install (it's a great feature for those of us who love wallpapers!)