The packages you usually install are .deb files, those files reside on launchpad and could be downloaded as
apt-get download your_package_name
Fully described in this question
In addition to that the installed pachages can be found in
/var/cache/apt/archive
But it won't help you very much, since each package is compiled/build against the libraries of that particular version.
Therefore as maintainer of a package you have to create several "variations" of the same code - check my PPA as example.
So taking these packages -made for Ubuntu 20.04 and installing them in 21.10 might succeed, if the libs haven't changed, but you can't count on that. So it is rather futile to "save packages for later use".
So this is where "snap" comes into place - a snap package delivers all the libs needed and is not really dependent on anything outside. The penalty is redundant code, slow performance and not to mention the different look and feel of the UI if you have selected your own theme.
Finally there is a possibility to create an LXC container (lighter than docker) with the correct Ubuntu version, install your app there and share your native X-Server and let that software run in this container.