Apt-get and flatpak - how to download and install from e.g. github?

"The overlay is removed when the OS is updated, and any changes you have made are removed. "

Does that also mean that, in case I install something with this overlay, this is also removed when the OS is updated? And is there a way to manually remove this overlay again, of course favourably with keeping everything I have installed?

Thanks