If you generate a BIP39 seed, that should work also in 20 years. If you save a private key, that should also work in 20 years.
See my
[overview] Recover Bitcoin from any old storage format:
I've seen many threads like:
Recovering weird old wallet, and the answer is often
very easy if someone recognizes the format.
Since the number of different formats will only grow, and (in the future) I expect more people to forget what format they used to store their Bitcoin 10 or more years ago, I've decided to create an overview.
Just in case: write down which wallet you used, including the version number. In 20 years a lot can change.