I keep my home directory organized and backed up on my NAS, so for me reinstalling is straightforward. Also I use Flatpaks whenever possible, so reinstall them is just looking at ~/.var/app and reinstalling what is there.
Other files to back up might be custom /etc confs, and maybe lists of packages you need (dpkg -l or rpm -qa are your friends).
I also use Linux brew for some more up to date software (e.g. golang) and just brew list is your command to get what you have installed.
In general, keep a backup of your home folder (I suggest skipping backing up ~/.cache to save some time and space) and you are mostly good to go.