Many years ago I started keeping license keys for apps in a text file to facilitate these kinds of os evolutions.
Then about 20 years ago I started using a password manager and keeping track of the license keys and app passwords there.
I now use 1Password, it has a specific category for software licenses (sure others do also) making it easy to track the license #, purchase date & price, urls for download and support, attach receipts, etc.
This has made migrations, upgrades and software reinstalls much less stressful, having all needed info in one place. Also eases responding to software update/upgrade notices by tracking version nums and purchase dates.
Only addresses one part of your question, but I recommend this for any of the methods. Particularly good for iPhones which don’t seem to transfer licenses and app passwords (assuming you don’t keep them in keychain, as I don’t).